<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span id="local-6989586621680835505"><span id="local-6989586621680835506"><span id="local-6989586621680835507"></span></span></span><span class="hs-pragma">{-# LANGUAGE CPP #-}</span><span>
</span><span id="line-2"></span><span class="hs-pragma">{-# LANGUAGE DeriveDataTypeable #-}</span><span>
</span><span id="line-3"></span><span class="hs-comment">--</span><span>
</span><span id="line-4"></span><span class="hs-comment">-- (c) The University of Glasgow</span><span>
</span><span id="line-5"></span><span class="hs-comment">--</span><span class="hs-cpp">

#include &quot;HsVersions.h&quot;
</span><span>
</span><span id="line-9"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">GHC.Types.Avail</span><span> </span><span class="hs-special">(</span><span>
</span><span id="line-10"></span><span>    </span><span class="annot"><a href="GHC.Types.Avail.html#Avails"><span class="hs-identifier">Avails</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-11"></span><span>    </span><span class="annot"><a href="GHC.Types.Avail.html#AvailInfo"><span class="hs-identifier">AvailInfo</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-12"></span><span>    </span><span class="annot"><a href="GHC.Types.Avail.html#avail"><span class="hs-identifier">avail</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-13"></span><span>    </span><span class="annot"><a href="GHC.Types.Avail.html#availsToNameSet"><span class="hs-identifier">availsToNameSet</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-14"></span><span>    </span><span class="annot"><a href="GHC.Types.Avail.html#availsToNameSetWithSelectors"><span class="hs-identifier">availsToNameSetWithSelectors</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-15"></span><span>    </span><span class="annot"><a href="GHC.Types.Avail.html#availsToNameEnv"><span class="hs-identifier">availsToNameEnv</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-16"></span><span>    </span><span class="annot"><a href="GHC.Types.Avail.html#availName"><span class="hs-identifier">availName</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Avail.html#availNames"><span class="hs-identifier">availNames</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Avail.html#availNonFldNames"><span class="hs-identifier">availNonFldNames</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-17"></span><span>    </span><span class="annot"><a href="GHC.Types.Avail.html#availNamesWithSelectors"><span class="hs-identifier">availNamesWithSelectors</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-18"></span><span>    </span><span class="annot"><a href="GHC.Types.Avail.html#availFlds"><span class="hs-identifier">availFlds</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-19"></span><span>    </span><span class="annot"><a href="GHC.Types.Avail.html#availsNamesWithOccs"><span class="hs-identifier">availsNamesWithOccs</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-20"></span><span>    </span><span class="annot"><a href="GHC.Types.Avail.html#availNamesWithOccs"><span class="hs-identifier">availNamesWithOccs</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-21"></span><span>    </span><span class="annot"><a href="GHC.Types.Avail.html#stableAvailCmp"><span class="hs-identifier">stableAvailCmp</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-22"></span><span>    </span><span class="annot"><a href="GHC.Types.Avail.html#plusAvail"><span class="hs-identifier">plusAvail</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-23"></span><span>    </span><span class="annot"><a href="GHC.Types.Avail.html#trimAvail"><span class="hs-identifier">trimAvail</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-24"></span><span>    </span><span class="annot"><a href="GHC.Types.Avail.html#filterAvail"><span class="hs-identifier">filterAvail</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-25"></span><span>    </span><span class="annot"><a href="GHC.Types.Avail.html#filterAvails"><span class="hs-identifier">filterAvails</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-26"></span><span>    </span><span class="annot"><a href="GHC.Types.Avail.html#nubAvails"><span class="hs-identifier">nubAvails</span></a></span><span>
</span><span id="line-27"></span><span>
</span><span id="line-28"></span><span>
</span><span id="line-29"></span><span>  </span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-30"></span><span>
</span><span id="line-31"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Prelude.html"><span class="hs-identifier">GHC.Prelude</span></a></span><span>
</span><span id="line-32"></span><span>
</span><span id="line-33"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Name.html"><span class="hs-identifier">GHC.Types.Name</span></a></span><span>
</span><span id="line-34"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Name.Env.html"><span class="hs-identifier">GHC.Types.Name.Env</span></a></span><span>
</span><span id="line-35"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Name.Set.html"><span class="hs-identifier">GHC.Types.Name.Set</span></a></span><span>
</span><span id="line-36"></span><span>
</span><span id="line-37"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.FieldLabel.html"><span class="hs-identifier">GHC.Types.FieldLabel</span></a></span><span>
</span><span id="line-38"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Utils.Binary.html"><span class="hs-identifier">GHC.Utils.Binary</span></a></span><span>
</span><span id="line-39"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Data.List.SetOps.html"><span class="hs-identifier">GHC.Data.List.SetOps</span></a></span><span>
</span><span id="line-40"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html"><span class="hs-identifier">GHC.Utils.Outputable</span></a></span><span>
</span><span id="line-41"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Utils.Misc.html"><span class="hs-identifier">GHC.Utils.Misc</span></a></span><span>
</span><span id="line-42"></span><span>
</span><span id="line-43"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.Data.html#"><span class="hs-identifier">Data.Data</span></a></span><span> </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="../../base/src/Data.Data.html#Data"><span class="hs-identifier">Data</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-44"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.List.html#"><span class="hs-identifier">Data.List</span></a></span><span> </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="../../base/src/Data.Foldable.html#find"><span class="hs-identifier">find</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-45"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.Function.html#"><span class="hs-identifier">Data.Function</span></a></span><span>
</span><span id="line-46"></span><span>
</span><span id="line-47"></span><span class="hs-comment">-- -----------------------------------------------------------------------------</span><span>
</span><span id="line-48"></span><span class="hs-comment">-- The AvailInfo type</span><span>
</span><span id="line-49"></span><span>
</span><span id="line-50"></span><span class="hs-comment">-- | Records what things are \&quot;available\&quot;, i.e. in scope</span><span>
</span><span id="line-51"></span><span class="hs-keyword">data</span><span> </span><span id="AvailInfo"><span class="annot"><a href="GHC.Types.Avail.html#AvailInfo"><span class="hs-identifier hs-var">AvailInfo</span></a></span></span><span>
</span><span id="line-52"></span><span>
</span><span id="line-53"></span><span>  </span><span class="hs-comment">-- | An ordinary identifier in scope</span><span>
</span><span id="line-54"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span id="Avail"><span class="annot"><a href="GHC.Types.Avail.html#Avail"><span class="hs-identifier hs-var">Avail</span></a></span></span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span>
</span><span id="line-55"></span><span>
</span><span id="line-56"></span><span>  </span><span class="hs-comment">-- | A type or class in scope</span><span>
</span><span id="line-57"></span><span>  </span><span class="hs-comment">--</span><span>
</span><span id="line-58"></span><span>  </span><span class="hs-comment">-- The __AvailTC Invariant__: If the type or class is itself to be in scope,</span><span>
</span><span id="line-59"></span><span>  </span><span class="hs-comment">-- it must be /first/ in this list.  Thus, typically:</span><span>
</span><span id="line-60"></span><span>  </span><span class="hs-comment">--</span><span>
</span><span id="line-61"></span><span>  </span><span class="hs-comment">-- &gt; AvailTC Eq [Eq, ==, \/=] []</span><span>
</span><span id="line-62"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="AvailTC"><span class="annot"><a href="GHC.Types.Avail.html#AvailTC"><span class="hs-identifier hs-var">AvailTC</span></a></span></span><span>
</span><span id="line-63"></span><span>       </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span>         </span><span class="hs-comment">-- ^ The name of the type or class</span><span>
</span><span id="line-64"></span><span>       </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span class="hs-special">]</span><span>       </span><span class="hs-comment">-- ^ The available pieces of type or class,</span><span>
</span><span id="line-65"></span><span>                    </span><span class="hs-comment">-- excluding field selectors.</span><span>
</span><span id="line-66"></span><span>       </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.FieldLabel.html#FieldLabel"><span class="hs-identifier hs-type">FieldLabel</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-comment">-- ^ The record fields of the type</span><span>
</span><span id="line-67"></span><span>                    </span><span class="hs-comment">-- (see Note [Representing fields in AvailInfo]).</span><span>
</span><span id="line-68"></span><span>
</span><span id="line-69"></span><span>   </span><span class="hs-keyword">deriving</span><span> </span><span class="hs-special">(</span><span> </span><span id="local-6989586621680835411"><span id="local-6989586621680835418"><span class="annot"><span class="annottext">AvailInfo -&gt; AvailInfo -&gt; Bool
(AvailInfo -&gt; AvailInfo -&gt; Bool)
-&gt; (AvailInfo -&gt; AvailInfo -&gt; Bool) -&gt; Eq AvailInfo
forall a. (a -&gt; a -&gt; Bool) -&gt; (a -&gt; a -&gt; Bool) -&gt; Eq a
/= :: AvailInfo -&gt; AvailInfo -&gt; Bool
$c/= :: AvailInfo -&gt; AvailInfo -&gt; Bool
== :: AvailInfo -&gt; AvailInfo -&gt; Bool
$c== :: AvailInfo -&gt; AvailInfo -&gt; Bool
</span><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var">Eq</span></span></span></span><span>    </span><span class="hs-comment">-- ^ Used when deciding if the interface has changed</span><span>
</span><span id="line-70"></span><span>            </span><span class="hs-special">,</span><span> </span><span id="local-6989586621680835368"><span id="local-6989586621680835370"><span id="local-6989586621680835372"><span id="local-6989586621680835374"><span id="local-6989586621680835376"><span id="local-6989586621680835378"><span id="local-6989586621680835380"><span id="local-6989586621680835382"><span id="local-6989586621680835384"><span id="local-6989586621680835386"><span id="local-6989586621680835388"><span id="local-6989586621680835390"><span id="local-6989586621680835397"><span id="local-6989586621680835406"><span class="annot"><span class="annottext">Typeable AvailInfo
Typeable AvailInfo
-&gt; (forall (c :: * -&gt; *).
    (forall d b. Data d =&gt; c (d -&gt; b) -&gt; d -&gt; c b)
    -&gt; (forall g. g -&gt; c g) -&gt; AvailInfo -&gt; c AvailInfo)
-&gt; (forall (c :: * -&gt; *).
    (forall b r. Data b =&gt; c (b -&gt; r) -&gt; c r)
    -&gt; (forall r. r -&gt; c r) -&gt; Constr -&gt; c AvailInfo)
-&gt; (AvailInfo -&gt; Constr)
-&gt; (AvailInfo -&gt; DataType)
-&gt; (forall (t :: * -&gt; *) (c :: * -&gt; *).
    Typeable t =&gt;
    (forall d. Data d =&gt; c (t d)) -&gt; Maybe (c AvailInfo))
-&gt; (forall (t :: * -&gt; * -&gt; *) (c :: * -&gt; *).
    Typeable t =&gt;
    (forall d e. (Data d, Data e) =&gt; c (t d e)) -&gt; Maybe (c AvailInfo))
-&gt; ((forall b. Data b =&gt; b -&gt; b) -&gt; AvailInfo -&gt; AvailInfo)
-&gt; (forall r r'.
    (r -&gt; r' -&gt; r)
    -&gt; r -&gt; (forall d. Data d =&gt; d -&gt; r') -&gt; AvailInfo -&gt; r)
-&gt; (forall r r'.
    (r' -&gt; r -&gt; r)
    -&gt; r -&gt; (forall d. Data d =&gt; d -&gt; r') -&gt; AvailInfo -&gt; r)
-&gt; (forall u. (forall d. Data d =&gt; d -&gt; u) -&gt; AvailInfo -&gt; [u])
-&gt; (forall u.
    Int -&gt; (forall d. Data d =&gt; d -&gt; u) -&gt; AvailInfo -&gt; u)
-&gt; (forall (m :: * -&gt; *).
    Monad m =&gt;
    (forall d. Data d =&gt; d -&gt; m d) -&gt; AvailInfo -&gt; m AvailInfo)
-&gt; (forall (m :: * -&gt; *).
    MonadPlus m =&gt;
    (forall d. Data d =&gt; d -&gt; m d) -&gt; AvailInfo -&gt; m AvailInfo)
-&gt; (forall (m :: * -&gt; *).
    MonadPlus m =&gt;
    (forall d. Data d =&gt; d -&gt; m d) -&gt; AvailInfo -&gt; m AvailInfo)
-&gt; Data AvailInfo
AvailInfo -&gt; DataType
AvailInfo -&gt; Constr
(forall b. Data b =&gt; b -&gt; b) -&gt; AvailInfo -&gt; AvailInfo
forall a.
Typeable a
-&gt; (forall (c :: * -&gt; *).
    (forall d b. Data d =&gt; c (d -&gt; b) -&gt; d -&gt; c b)
    -&gt; (forall g. g -&gt; c g) -&gt; a -&gt; c a)
-&gt; (forall (c :: * -&gt; *).
    (forall b r. Data b =&gt; c (b -&gt; r) -&gt; c r)
    -&gt; (forall r. r -&gt; c r) -&gt; Constr -&gt; c a)
-&gt; (a -&gt; Constr)
-&gt; (a -&gt; DataType)
-&gt; (forall (t :: * -&gt; *) (c :: * -&gt; *).
    Typeable t =&gt;
    (forall d. Data d =&gt; c (t d)) -&gt; Maybe (c a))
-&gt; (forall (t :: * -&gt; * -&gt; *) (c :: * -&gt; *).
    Typeable t =&gt;
    (forall d e. (Data d, Data e) =&gt; c (t d e)) -&gt; Maybe (c a))
-&gt; ((forall b. Data b =&gt; b -&gt; b) -&gt; a -&gt; a)
-&gt; (forall r r'.
    (r -&gt; r' -&gt; r) -&gt; r -&gt; (forall d. Data d =&gt; d -&gt; r') -&gt; a -&gt; r)
-&gt; (forall r r'.
    (r' -&gt; r -&gt; r) -&gt; r -&gt; (forall d. Data d =&gt; d -&gt; r') -&gt; a -&gt; r)
-&gt; (forall u. (forall d. Data d =&gt; d -&gt; u) -&gt; a -&gt; [u])
-&gt; (forall u. Int -&gt; (forall d. Data d =&gt; d -&gt; u) -&gt; a -&gt; u)
-&gt; (forall (m :: * -&gt; *).
    Monad m =&gt;
    (forall d. Data d =&gt; d -&gt; m d) -&gt; a -&gt; m a)
-&gt; (forall (m :: * -&gt; *).
    MonadPlus m =&gt;
    (forall d. Data d =&gt; d -&gt; m d) -&gt; a -&gt; m a)
-&gt; (forall (m :: * -&gt; *).
    MonadPlus m =&gt;
    (forall d. Data d =&gt; d -&gt; m d) -&gt; a -&gt; m a)
-&gt; Data a
forall u. Int -&gt; (forall d. Data d =&gt; d -&gt; u) -&gt; AvailInfo -&gt; u
forall u. (forall d. Data d =&gt; d -&gt; u) -&gt; AvailInfo -&gt; [u]
forall r r'.
(r -&gt; r' -&gt; r)
-&gt; r -&gt; (forall d. Data d =&gt; d -&gt; r') -&gt; AvailInfo -&gt; r
forall r r'.
(r' -&gt; r -&gt; r)
-&gt; r -&gt; (forall d. Data d =&gt; d -&gt; r') -&gt; AvailInfo -&gt; r
forall (m :: * -&gt; *).
Monad m =&gt;
(forall d. Data d =&gt; d -&gt; m d) -&gt; AvailInfo -&gt; m AvailInfo
forall (m :: * -&gt; *).
MonadPlus m =&gt;
(forall d. Data d =&gt; d -&gt; m d) -&gt; AvailInfo -&gt; m AvailInfo
forall (c :: * -&gt; *).
(forall b r. Data b =&gt; c (b -&gt; r) -&gt; c r)
-&gt; (forall r. r -&gt; c r) -&gt; Constr -&gt; c AvailInfo
forall (c :: * -&gt; *).
(forall d b. Data d =&gt; c (d -&gt; b) -&gt; d -&gt; c b)
-&gt; (forall g. g -&gt; c g) -&gt; AvailInfo -&gt; c AvailInfo
forall (t :: * -&gt; *) (c :: * -&gt; *).
Typeable t =&gt;
(forall d. Data d =&gt; c (t d)) -&gt; Maybe (c AvailInfo)
forall (t :: * -&gt; * -&gt; *) (c :: * -&gt; *).
Typeable t =&gt;
(forall d e. (Data d, Data e) =&gt; c (t d e)) -&gt; Maybe (c AvailInfo)
gmapMo :: forall (m :: * -&gt; *).
MonadPlus m =&gt;
(forall d. Data d =&gt; d -&gt; m d) -&gt; AvailInfo -&gt; m AvailInfo
$cgmapMo :: forall (m :: * -&gt; *).
MonadPlus m =&gt;
(forall d. Data d =&gt; d -&gt; m d) -&gt; AvailInfo -&gt; m AvailInfo
gmapMp :: forall (m :: * -&gt; *).
MonadPlus m =&gt;
(forall d. Data d =&gt; d -&gt; m d) -&gt; AvailInfo -&gt; m AvailInfo
$cgmapMp :: forall (m :: * -&gt; *).
MonadPlus m =&gt;
(forall d. Data d =&gt; d -&gt; m d) -&gt; AvailInfo -&gt; m AvailInfo
gmapM :: forall (m :: * -&gt; *).
Monad m =&gt;
(forall d. Data d =&gt; d -&gt; m d) -&gt; AvailInfo -&gt; m AvailInfo
$cgmapM :: forall (m :: * -&gt; *).
Monad m =&gt;
(forall d. Data d =&gt; d -&gt; m d) -&gt; AvailInfo -&gt; m AvailInfo
gmapQi :: forall u. Int -&gt; (forall d. Data d =&gt; d -&gt; u) -&gt; AvailInfo -&gt; u
$cgmapQi :: forall u. Int -&gt; (forall d. Data d =&gt; d -&gt; u) -&gt; AvailInfo -&gt; u
gmapQ :: forall u. (forall d. Data d =&gt; d -&gt; u) -&gt; AvailInfo -&gt; [u]
$cgmapQ :: forall u. (forall d. Data d =&gt; d -&gt; u) -&gt; AvailInfo -&gt; [u]
gmapQr :: forall r r'.
(r' -&gt; r -&gt; r)
-&gt; r -&gt; (forall d. Data d =&gt; d -&gt; r') -&gt; AvailInfo -&gt; r
$cgmapQr :: forall r r'.
(r' -&gt; r -&gt; r)
-&gt; r -&gt; (forall d. Data d =&gt; d -&gt; r') -&gt; AvailInfo -&gt; r
gmapQl :: forall r r'.
(r -&gt; r' -&gt; r)
-&gt; r -&gt; (forall d. Data d =&gt; d -&gt; r') -&gt; AvailInfo -&gt; r
$cgmapQl :: forall r r'.
(r -&gt; r' -&gt; r)
-&gt; r -&gt; (forall d. Data d =&gt; d -&gt; r') -&gt; AvailInfo -&gt; r
gmapT :: (forall b. Data b =&gt; b -&gt; b) -&gt; AvailInfo -&gt; AvailInfo
$cgmapT :: (forall b. Data b =&gt; b -&gt; b) -&gt; AvailInfo -&gt; AvailInfo
dataCast2 :: forall (t :: * -&gt; * -&gt; *) (c :: * -&gt; *).
Typeable t =&gt;
(forall d e. (Data d, Data e) =&gt; c (t d e)) -&gt; Maybe (c AvailInfo)
$cdataCast2 :: forall (t :: * -&gt; * -&gt; *) (c :: * -&gt; *).
Typeable t =&gt;
(forall d e. (Data d, Data e) =&gt; c (t d e)) -&gt; Maybe (c AvailInfo)
dataCast1 :: forall (t :: * -&gt; *) (c :: * -&gt; *).
Typeable t =&gt;
(forall d. Data d =&gt; c (t d)) -&gt; Maybe (c AvailInfo)
$cdataCast1 :: forall (t :: * -&gt; *) (c :: * -&gt; *).
Typeable t =&gt;
(forall d. Data d =&gt; c (t d)) -&gt; Maybe (c AvailInfo)
dataTypeOf :: AvailInfo -&gt; DataType
$cdataTypeOf :: AvailInfo -&gt; DataType
toConstr :: AvailInfo -&gt; Constr
$ctoConstr :: AvailInfo -&gt; Constr
gunfold :: forall (c :: * -&gt; *).
(forall b r. Data b =&gt; c (b -&gt; r) -&gt; c r)
-&gt; (forall r. r -&gt; c r) -&gt; Constr -&gt; c AvailInfo
$cgunfold :: forall (c :: * -&gt; *).
(forall b r. Data b =&gt; c (b -&gt; r) -&gt; c r)
-&gt; (forall r. r -&gt; c r) -&gt; Constr -&gt; c AvailInfo
gfoldl :: forall (c :: * -&gt; *).
(forall d b. Data d =&gt; c (d -&gt; b) -&gt; d -&gt; c b)
-&gt; (forall g. g -&gt; c g) -&gt; AvailInfo -&gt; c AvailInfo
$cgfoldl :: forall (c :: * -&gt; *).
(forall d b. Data d =&gt; c (d -&gt; b) -&gt; d -&gt; c b)
-&gt; (forall g. g -&gt; c g) -&gt; AvailInfo -&gt; c AvailInfo
</span><a href="../../base/src/Data.Data.html#Data"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var">Data</span></a></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-71"></span><span>
</span><span id="line-72"></span><span class="hs-comment">-- | A collection of 'AvailInfo' - several things that are \&quot;available\&quot;</span><span>
</span><span id="line-73"></span><span class="hs-keyword">type</span><span> </span><span id="Avails"><span class="annot"><a href="GHC.Types.Avail.html#Avails"><span class="hs-identifier hs-var">Avails</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.Avail.html#AvailInfo"><span class="hs-identifier hs-type">AvailInfo</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-74"></span><span>
</span><span id="line-75"></span><span class="hs-comment">{-
Note [Representing fields in AvailInfo]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
When -XDuplicateRecordFields is disabled (the normal case), a
datatype like

  data T = MkT { foo :: Int }

gives rise to the AvailInfo

  AvailTC T [T, MkT] [FieldLabel &quot;foo&quot; False foo]

whereas if -XDuplicateRecordFields is enabled it gives

  AvailTC T [T, MkT] [FieldLabel &quot;foo&quot; True $sel:foo:MkT]

since the label does not match the selector name.

The labels in a field list are not necessarily unique:
data families allow the same parent (the family tycon) to have
multiple distinct fields with the same label. For example,

  data family F a
  data instance F Int  = MkFInt { foo :: Int }
  data instance F Bool = MkFBool { foo :: Bool}

gives rise to

  AvailTC F [ F, MkFInt, MkFBool ]
            [ FieldLabel &quot;foo&quot; True $sel:foo:MkFInt
            , FieldLabel &quot;foo&quot; True $sel:foo:MkFBool ]

Moreover, note that the flIsOverloaded flag need not be the same for
all the elements of the list.  In the example above, this occurs if
the two data instances are defined in different modules, one with
`-XDuplicateRecordFields` enabled and one with it disabled.  Thus it
is possible to have

  AvailTC F [ F, MkFInt, MkFBool ]
            [ FieldLabel &quot;foo&quot; True $sel:foo:MkFInt
            , FieldLabel &quot;foo&quot; False foo ]

If the two data instances are defined in different modules, both
without `-XDuplicateRecordFields`, it will be impossible to export
them from the same module (even with `-XDuplicateRecordfields`
enabled), because they would be represented identically.  The
workaround here is to enable `-XDuplicateRecordFields` on the defining
modules.
-}</span><span>
</span><span id="line-124"></span><span>
</span><span id="line-125"></span><span class="hs-comment">-- | Compare lexicographically</span><span>
</span><span id="line-126"></span><span class="annot"><a href="GHC.Types.Avail.html#stableAvailCmp"><span class="hs-identifier hs-type">stableAvailCmp</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Avail.html#AvailInfo"><span class="hs-identifier hs-type">AvailInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Avail.html#AvailInfo"><span class="hs-identifier hs-type">AvailInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Ordering</span></span><span>
</span><span id="line-127"></span><span id="stableAvailCmp"><span class="annot"><span class="annottext">stableAvailCmp :: AvailInfo -&gt; AvailInfo -&gt; Ordering
</span><a href="GHC.Types.Avail.html#stableAvailCmp"><span class="hs-identifier hs-var hs-var">stableAvailCmp</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Avail.html#Avail"><span class="hs-identifier hs-type">Avail</span></a></span><span> </span><span id="local-6989586621680835365"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680835365"><span class="hs-identifier hs-var">n1</span></a></span></span><span class="hs-special">)</span><span>       </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Avail.html#Avail"><span class="hs-identifier hs-type">Avail</span></a></span><span> </span><span id="local-6989586621680835364"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680835364"><span class="hs-identifier hs-var">n2</span></a></span></span><span class="hs-special">)</span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680835365"><span class="hs-identifier hs-var">n1</span></a></span><span> </span><span class="annot"><span class="annottext">Name -&gt; Name -&gt; Ordering
</span><a href="GHC.Types.Name.html#stableNameCmp"><span class="hs-operator hs-var">`stableNameCmp`</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680835364"><span class="hs-identifier hs-var">n2</span></a></span><span>
</span><span id="line-128"></span><span class="annot"><a href="GHC.Types.Avail.html#stableAvailCmp"><span class="hs-identifier hs-var">stableAvailCmp</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Avail.html#Avail"><span class="hs-identifier hs-type">Avail</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">)</span><span>         </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Avail.html#AvailTC"><span class="hs-identifier hs-type">AvailTC</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">)</span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Ordering
</span><span class="hs-identifier hs-var">LT</span></span><span>
</span><span id="line-129"></span><span class="annot"><a href="GHC.Types.Avail.html#stableAvailCmp"><span class="hs-identifier hs-var">stableAvailCmp</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Avail.html#AvailTC"><span class="hs-identifier hs-type">AvailTC</span></a></span><span> </span><span id="local-6989586621680835362"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680835362"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span id="local-6989586621680835361"><span class="annot"><span class="annottext">[Name]
</span><a href="#local-6989586621680835361"><span class="hs-identifier hs-var">ns</span></a></span></span><span> </span><span id="local-6989586621680835360"><span class="annot"><span class="annottext">[FieldLabel]
</span><a href="#local-6989586621680835360"><span class="hs-identifier hs-var">nfs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Avail.html#AvailTC"><span class="hs-identifier hs-type">AvailTC</span></a></span><span> </span><span id="local-6989586621680835359"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680835359"><span class="hs-identifier hs-var">m</span></a></span></span><span> </span><span id="local-6989586621680835358"><span class="annot"><span class="annottext">[Name]
</span><a href="#local-6989586621680835358"><span class="hs-identifier hs-var">ms</span></a></span></span><span> </span><span id="local-6989586621680835357"><span class="annot"><span class="annottext">[FieldLabel]
</span><a href="#local-6989586621680835357"><span class="hs-identifier hs-var">mfs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-130"></span><span>    </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680835362"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Name -&gt; Name -&gt; Ordering
</span><a href="GHC.Types.Name.html#stableNameCmp"><span class="hs-operator hs-var">`stableNameCmp`</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680835359"><span class="hs-identifier hs-var">m</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Ordering -&gt; Ordering -&gt; Ordering
</span><a href="GHC.Utils.Misc.html#thenCmp"><span class="hs-operator hs-var">`thenCmp`</span></a></span><span>
</span><span id="line-131"></span><span>    </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(Name -&gt; Name -&gt; Ordering) -&gt; [Name] -&gt; [Name] -&gt; Ordering
forall a. (a -&gt; a -&gt; Ordering) -&gt; [a] -&gt; [a] -&gt; Ordering
</span><a href="GHC.Utils.Misc.html#cmpList"><span class="hs-identifier hs-var">cmpList</span></a></span><span> </span><span class="annot"><span class="annottext">Name -&gt; Name -&gt; Ordering
</span><a href="GHC.Types.Name.html#stableNameCmp"><span class="hs-identifier hs-var">stableNameCmp</span></a></span><span> </span><span class="annot"><span class="annottext">[Name]
</span><a href="#local-6989586621680835361"><span class="hs-identifier hs-var">ns</span></a></span><span> </span><span class="annot"><span class="annottext">[Name]
</span><a href="#local-6989586621680835358"><span class="hs-identifier hs-var">ms</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Ordering -&gt; Ordering -&gt; Ordering
</span><a href="GHC.Utils.Misc.html#thenCmp"><span class="hs-operator hs-var">`thenCmp`</span></a></span><span>
</span><span id="line-132"></span><span>    </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(FieldLabel -&gt; FieldLabel -&gt; Ordering)
-&gt; [FieldLabel] -&gt; [FieldLabel] -&gt; Ordering
forall a. (a -&gt; a -&gt; Ordering) -&gt; [a] -&gt; [a] -&gt; Ordering
</span><a href="GHC.Utils.Misc.html#cmpList"><span class="hs-identifier hs-var">cmpList</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Name -&gt; Name -&gt; Ordering
</span><a href="GHC.Types.Name.html#stableNameCmp"><span class="hs-identifier hs-var">stableNameCmp</span></a></span><span> </span><span class="annot"><span class="annottext">(Name -&gt; Name -&gt; Ordering)
-&gt; (FieldLabel -&gt; Name) -&gt; FieldLabel -&gt; FieldLabel -&gt; Ordering
forall b c a. (b -&gt; b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; a -&gt; c
</span><a href="../../base/src/Data.Function.html#on"><span class="hs-operator hs-var">`on`</span></a></span><span> </span><span class="annot"><span class="annottext">FieldLabel -&gt; Name
forall a. FieldLbl a -&gt; a
</span><a href="GHC.Types.FieldLabel.html#flSelector"><span class="hs-identifier hs-var hs-var">flSelector</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[FieldLabel]
</span><a href="#local-6989586621680835360"><span class="hs-identifier hs-var">nfs</span></a></span><span> </span><span class="annot"><span class="annottext">[FieldLabel]
</span><a href="#local-6989586621680835357"><span class="hs-identifier hs-var">mfs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-133"></span><span class="annot"><a href="GHC.Types.Avail.html#stableAvailCmp"><span class="hs-identifier hs-var">stableAvailCmp</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Avail.html#AvailTC"><span class="hs-identifier hs-type">AvailTC</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">)</span><span>       </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Avail.html#Avail"><span class="hs-identifier hs-type">Avail</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">)</span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Ordering
</span><span class="hs-identifier hs-var">GT</span></span><span>
</span><span id="line-134"></span><span>
</span><span id="line-135"></span><span class="annot"><a href="GHC.Types.Avail.html#avail"><span class="hs-identifier hs-type">avail</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Avail.html#AvailInfo"><span class="hs-identifier hs-type">AvailInfo</span></a></span><span>
</span><span id="line-136"></span><span id="avail"><span class="annot"><span class="annottext">avail :: Name -&gt; AvailInfo
</span><a href="GHC.Types.Avail.html#avail"><span class="hs-identifier hs-var hs-var">avail</span></a></span></span><span> </span><span id="local-6989586621680835352"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680835352"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Name -&gt; AvailInfo
</span><a href="GHC.Types.Avail.html#Avail"><span class="hs-identifier hs-var">Avail</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680835352"><span class="hs-identifier hs-var">n</span></a></span><span>
</span><span id="line-137"></span><span>
</span><span id="line-138"></span><span class="hs-comment">-- -----------------------------------------------------------------------------</span><span>
</span><span id="line-139"></span><span class="hs-comment">-- Operations on AvailInfo</span><span>
</span><span id="line-140"></span><span>
</span><span id="line-141"></span><span class="annot"><a href="GHC.Types.Avail.html#availsToNameSet"><span class="hs-identifier hs-type">availsToNameSet</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.Avail.html#AvailInfo"><span class="hs-identifier hs-type">AvailInfo</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Name.Set.html#NameSet"><span class="hs-identifier hs-type">NameSet</span></a></span><span>
</span><span id="line-142"></span><span id="availsToNameSet"><span class="annot"><span class="annottext">availsToNameSet :: [AvailInfo] -&gt; NameSet
</span><a href="GHC.Types.Avail.html#availsToNameSet"><span class="hs-identifier hs-var hs-var">availsToNameSet</span></a></span></span><span> </span><span id="local-6989586621680835351"><span class="annot"><span class="annottext">[AvailInfo]
</span><a href="#local-6989586621680835351"><span class="hs-identifier hs-var">avails</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(AvailInfo -&gt; NameSet -&gt; NameSet)
-&gt; NameSet -&gt; [AvailInfo] -&gt; NameSet
forall (t :: * -&gt; *) a b.
Foldable t =&gt;
(a -&gt; b -&gt; b) -&gt; b -&gt; t a -&gt; b
</span><a href="../../base/src/Data.Foldable.html#foldr"><span class="hs-identifier hs-var">foldr</span></a></span><span> </span><span class="annot"><span class="annottext">AvailInfo -&gt; NameSet -&gt; NameSet
</span><a href="#local-6989586621680835349"><span class="hs-identifier hs-var">add</span></a></span><span> </span><span class="annot"><span class="annottext">NameSet
</span><a href="GHC.Types.Name.Set.html#emptyNameSet"><span class="hs-identifier hs-var">emptyNameSet</span></a></span><span> </span><span class="annot"><span class="annottext">[AvailInfo]
</span><a href="#local-6989586621680835351"><span class="hs-identifier hs-var">avails</span></a></span><span>
</span><span id="line-143"></span><span>      </span><span class="hs-keyword">where</span><span> </span><span id="local-6989586621680835349"><span class="annot"><span class="annottext">add :: AvailInfo -&gt; NameSet -&gt; NameSet
</span><a href="#local-6989586621680835349"><span class="hs-identifier hs-var hs-var">add</span></a></span></span><span> </span><span id="local-6989586621680835347"><span class="annot"><span class="annottext">AvailInfo
</span><a href="#local-6989586621680835347"><span class="hs-identifier hs-var">avail</span></a></span></span><span> </span><span id="local-6989586621680835346"><span class="annot"><span class="annottext">NameSet
</span><a href="#local-6989586621680835346"><span class="hs-identifier hs-var">set</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">NameSet -&gt; [Name] -&gt; NameSet
</span><a href="GHC.Types.Name.Set.html#extendNameSetList"><span class="hs-identifier hs-var">extendNameSetList</span></a></span><span> </span><span class="annot"><span class="annottext">NameSet
</span><a href="#local-6989586621680835346"><span class="hs-identifier hs-var">set</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">AvailInfo -&gt; [Name]
</span><a href="GHC.Types.Avail.html#availNames"><span class="hs-identifier hs-var">availNames</span></a></span><span> </span><span class="annot"><span class="annottext">AvailInfo
</span><a href="#local-6989586621680835347"><span class="hs-identifier hs-var">avail</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-144"></span><span>
</span><span id="line-145"></span><span class="annot"><a href="GHC.Types.Avail.html#availsToNameSetWithSelectors"><span class="hs-identifier hs-type">availsToNameSetWithSelectors</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.Avail.html#AvailInfo"><span class="hs-identifier hs-type">AvailInfo</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Name.Set.html#NameSet"><span class="hs-identifier hs-type">NameSet</span></a></span><span>
</span><span id="line-146"></span><span id="availsToNameSetWithSelectors"><span class="annot"><span class="annottext">availsToNameSetWithSelectors :: [AvailInfo] -&gt; NameSet
</span><a href="GHC.Types.Avail.html#availsToNameSetWithSelectors"><span class="hs-identifier hs-var hs-var">availsToNameSetWithSelectors</span></a></span></span><span> </span><span id="local-6989586621680835344"><span class="annot"><span class="annottext">[AvailInfo]
</span><a href="#local-6989586621680835344"><span class="hs-identifier hs-var">avails</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(AvailInfo -&gt; NameSet -&gt; NameSet)
-&gt; NameSet -&gt; [AvailInfo] -&gt; NameSet
forall (t :: * -&gt; *) a b.
Foldable t =&gt;
(a -&gt; b -&gt; b) -&gt; b -&gt; t a -&gt; b
</span><a href="../../base/src/Data.Foldable.html#foldr"><span class="hs-identifier hs-var">foldr</span></a></span><span> </span><span class="annot"><span class="annottext">AvailInfo -&gt; NameSet -&gt; NameSet
</span><a href="#local-6989586621680835343"><span class="hs-identifier hs-var">add</span></a></span><span> </span><span class="annot"><span class="annottext">NameSet
</span><a href="GHC.Types.Name.Set.html#emptyNameSet"><span class="hs-identifier hs-var">emptyNameSet</span></a></span><span> </span><span class="annot"><span class="annottext">[AvailInfo]
</span><a href="#local-6989586621680835344"><span class="hs-identifier hs-var">avails</span></a></span><span>
</span><span id="line-147"></span><span>      </span><span class="hs-keyword">where</span><span> </span><span id="local-6989586621680835343"><span class="annot"><span class="annottext">add :: AvailInfo -&gt; NameSet -&gt; NameSet
</span><a href="#local-6989586621680835343"><span class="hs-identifier hs-var hs-var">add</span></a></span></span><span> </span><span id="local-6989586621680835342"><span class="annot"><span class="annottext">AvailInfo
</span><a href="#local-6989586621680835342"><span class="hs-identifier hs-var">avail</span></a></span></span><span> </span><span id="local-6989586621680835341"><span class="annot"><span class="annottext">NameSet
</span><a href="#local-6989586621680835341"><span class="hs-identifier hs-var">set</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">NameSet -&gt; [Name] -&gt; NameSet
</span><a href="GHC.Types.Name.Set.html#extendNameSetList"><span class="hs-identifier hs-var">extendNameSetList</span></a></span><span> </span><span class="annot"><span class="annottext">NameSet
</span><a href="#local-6989586621680835341"><span class="hs-identifier hs-var">set</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">AvailInfo -&gt; [Name]
</span><a href="GHC.Types.Avail.html#availNamesWithSelectors"><span class="hs-identifier hs-var">availNamesWithSelectors</span></a></span><span> </span><span class="annot"><span class="annottext">AvailInfo
</span><a href="#local-6989586621680835342"><span class="hs-identifier hs-var">avail</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-148"></span><span>
</span><span id="line-149"></span><span class="annot"><a href="GHC.Types.Avail.html#availsToNameEnv"><span class="hs-identifier hs-type">availsToNameEnv</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.Avail.html#AvailInfo"><span class="hs-identifier hs-type">AvailInfo</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Name.Env.html#NameEnv"><span class="hs-identifier hs-type">NameEnv</span></a></span><span> </span><span class="annot"><a href="GHC.Types.Avail.html#AvailInfo"><span class="hs-identifier hs-type">AvailInfo</span></a></span><span>
</span><span id="line-150"></span><span id="availsToNameEnv"><span class="annot"><span class="annottext">availsToNameEnv :: [AvailInfo] -&gt; NameEnv AvailInfo
</span><a href="GHC.Types.Avail.html#availsToNameEnv"><span class="hs-identifier hs-var hs-var">availsToNameEnv</span></a></span></span><span> </span><span id="local-6989586621680835340"><span class="annot"><span class="annottext">[AvailInfo]
</span><a href="#local-6989586621680835340"><span class="hs-identifier hs-var">avails</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(AvailInfo -&gt; NameEnv AvailInfo -&gt; NameEnv AvailInfo)
-&gt; NameEnv AvailInfo -&gt; [AvailInfo] -&gt; NameEnv AvailInfo
forall (t :: * -&gt; *) a b.
Foldable t =&gt;
(a -&gt; b -&gt; b) -&gt; b -&gt; t a -&gt; b
</span><a href="../../base/src/Data.Foldable.html#foldr"><span class="hs-identifier hs-var">foldr</span></a></span><span> </span><span class="annot"><span class="annottext">AvailInfo -&gt; NameEnv AvailInfo -&gt; NameEnv AvailInfo
</span><a href="#local-6989586621680835339"><span class="hs-identifier hs-var">add</span></a></span><span> </span><span class="annot"><span class="annottext">NameEnv AvailInfo
forall a. NameEnv a
</span><a href="GHC.Types.Name.Env.html#emptyNameEnv"><span class="hs-identifier hs-var">emptyNameEnv</span></a></span><span> </span><span class="annot"><span class="annottext">[AvailInfo]
</span><a href="#local-6989586621680835340"><span class="hs-identifier hs-var">avails</span></a></span><span>
</span><span id="line-151"></span><span>     </span><span class="hs-keyword">where</span><span> </span><span id="local-6989586621680835339"><span class="annot"><span class="annottext">add :: AvailInfo -&gt; NameEnv AvailInfo -&gt; NameEnv AvailInfo
</span><a href="#local-6989586621680835339"><span class="hs-identifier hs-var hs-var">add</span></a></span></span><span> </span><span id="local-6989586621680835337"><span class="annot"><span class="annottext">AvailInfo
</span><a href="#local-6989586621680835337"><span class="hs-identifier hs-var">avail</span></a></span></span><span> </span><span id="local-6989586621680835336"><span class="annot"><span class="annottext">NameEnv AvailInfo
</span><a href="#local-6989586621680835336"><span class="hs-identifier hs-var">env</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">NameEnv AvailInfo -&gt; [(Name, AvailInfo)] -&gt; NameEnv AvailInfo
forall a. NameEnv a -&gt; [(Name, a)] -&gt; NameEnv a
</span><a href="GHC.Types.Name.Env.html#extendNameEnvList"><span class="hs-identifier hs-var">extendNameEnvList</span></a></span><span> </span><span class="annot"><span class="annottext">NameEnv AvailInfo
</span><a href="#local-6989586621680835336"><span class="hs-identifier hs-var">env</span></a></span><span>
</span><span id="line-152"></span><span>                                </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[Name] -&gt; [AvailInfo] -&gt; [(Name, AvailInfo)]
forall a b. [a] -&gt; [b] -&gt; [(a, b)]
</span><a href="../../base/src/GHC.List.html#zip"><span class="hs-identifier hs-var">zip</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">AvailInfo -&gt; [Name]
</span><a href="GHC.Types.Avail.html#availNames"><span class="hs-identifier hs-var">availNames</span></a></span><span> </span><span class="annot"><span class="annottext">AvailInfo
</span><a href="#local-6989586621680835337"><span class="hs-identifier hs-var">avail</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">AvailInfo -&gt; [AvailInfo]
forall a. a -&gt; [a]
</span><a href="../../base/src/GHC.List.html#repeat"><span class="hs-identifier hs-var">repeat</span></a></span><span> </span><span class="annot"><span class="annottext">AvailInfo
</span><a href="#local-6989586621680835337"><span class="hs-identifier hs-var">avail</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-153"></span><span>
</span><span id="line-154"></span><span class="hs-comment">-- | Just the main name made available, i.e. not the available pieces</span><span>
</span><span id="line-155"></span><span class="hs-comment">-- of type or class brought into scope by the 'GenAvailInfo'</span><span>
</span><span id="line-156"></span><span class="annot"><a href="GHC.Types.Avail.html#availName"><span class="hs-identifier hs-type">availName</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Avail.html#AvailInfo"><span class="hs-identifier hs-type">AvailInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span>
</span><span id="line-157"></span><span id="availName"><span class="annot"><span class="annottext">availName :: AvailInfo -&gt; Name
</span><a href="GHC.Types.Avail.html#availName"><span class="hs-identifier hs-var hs-var">availName</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Avail.html#Avail"><span class="hs-identifier hs-type">Avail</span></a></span><span> </span><span id="local-6989586621680835333"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680835333"><span class="hs-identifier hs-var">n</span></a></span></span><span class="hs-special">)</span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680835333"><span class="hs-identifier hs-var">n</span></a></span><span>
</span><span id="line-158"></span><span class="annot"><a href="GHC.Types.Avail.html#availName"><span class="hs-identifier hs-var">availName</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Avail.html#AvailTC"><span class="hs-identifier hs-type">AvailTC</span></a></span><span> </span><span id="local-6989586621680835332"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680835332"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span class="annot"><span class="annottext">[Name]
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">[FieldLabel]
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680835332"><span class="hs-identifier hs-var">n</span></a></span><span>
</span><span id="line-159"></span><span>
</span><span id="line-160"></span><span class="hs-comment">-- | All names made available by the availability information (excluding overloaded selectors)</span><span>
</span><span id="line-161"></span><span class="annot"><a href="GHC.Types.Avail.html#availNames"><span class="hs-identifier hs-type">availNames</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Avail.html#AvailInfo"><span class="hs-identifier hs-type">AvailInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-162"></span><span id="availNames"><span class="annot"><span class="annottext">availNames :: AvailInfo -&gt; [Name]
</span><a href="GHC.Types.Avail.html#availNames"><span class="hs-identifier hs-var hs-var">availNames</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Avail.html#Avail"><span class="hs-identifier hs-type">Avail</span></a></span><span> </span><span id="local-6989586621680835331"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680835331"><span class="hs-identifier hs-var">n</span></a></span></span><span class="hs-special">)</span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680835331"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-163"></span><span class="annot"><a href="GHC.Types.Avail.html#availNames"><span class="hs-identifier hs-var">availNames</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Avail.html#AvailTC"><span class="hs-identifier hs-type">AvailTC</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680835330"><span class="annot"><span class="annottext">[Name]
</span><a href="#local-6989586621680835330"><span class="hs-identifier hs-var">ns</span></a></span></span><span> </span><span id="local-6989586621680835329"><span class="annot"><span class="annottext">[FieldLabel]
</span><a href="#local-6989586621680835329"><span class="hs-identifier hs-var">fs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Name]
</span><a href="#local-6989586621680835330"><span class="hs-identifier hs-var">ns</span></a></span><span> </span><span class="annot"><span class="annottext">[Name] -&gt; [Name] -&gt; [Name]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">FieldLabel -&gt; Name
forall a. FieldLbl a -&gt; a
</span><a href="GHC.Types.FieldLabel.html#flSelector"><span class="hs-identifier hs-var hs-var">flSelector</span></a></span><span> </span><span class="annot"><span class="annottext">FieldLabel
</span><a href="#local-6989586621680835328"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="hs-glyph">|</span><span> </span><span id="local-6989586621680835328"><span class="annot"><span class="annottext">FieldLabel
</span><a href="#local-6989586621680835328"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[FieldLabel]
</span><a href="#local-6989586621680835329"><span class="hs-identifier hs-var">fs</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FieldLabel -&gt; Bool
forall a. FieldLbl a -&gt; Bool
</span><a href="GHC.Types.FieldLabel.html#flIsOverloaded"><span class="hs-identifier hs-var hs-var">flIsOverloaded</span></a></span><span> </span><span class="annot"><span class="annottext">FieldLabel
</span><a href="#local-6989586621680835328"><span class="hs-identifier hs-var">f</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-164"></span><span>
</span><span id="line-165"></span><span class="hs-comment">-- | All names made available by the availability information (including overloaded selectors)</span><span>
</span><span id="line-166"></span><span class="annot"><a href="GHC.Types.Avail.html#availNamesWithSelectors"><span class="hs-identifier hs-type">availNamesWithSelectors</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Avail.html#AvailInfo"><span class="hs-identifier hs-type">AvailInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-167"></span><span id="availNamesWithSelectors"><span class="annot"><span class="annottext">availNamesWithSelectors :: AvailInfo -&gt; [Name]
</span><a href="GHC.Types.Avail.html#availNamesWithSelectors"><span class="hs-identifier hs-var hs-var">availNamesWithSelectors</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Avail.html#Avail"><span class="hs-identifier hs-type">Avail</span></a></span><span> </span><span id="local-6989586621680835325"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680835325"><span class="hs-identifier hs-var">n</span></a></span></span><span class="hs-special">)</span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680835325"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-168"></span><span class="annot"><a href="GHC.Types.Avail.html#availNamesWithSelectors"><span class="hs-identifier hs-var">availNamesWithSelectors</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Avail.html#AvailTC"><span class="hs-identifier hs-type">AvailTC</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680835324"><span class="annot"><span class="annottext">[Name]
</span><a href="#local-6989586621680835324"><span class="hs-identifier hs-var">ns</span></a></span></span><span> </span><span id="local-6989586621680835323"><span class="annot"><span class="annottext">[FieldLabel]
</span><a href="#local-6989586621680835323"><span class="hs-identifier hs-var">fs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Name]
</span><a href="#local-6989586621680835324"><span class="hs-identifier hs-var">ns</span></a></span><span> </span><span class="annot"><span class="annottext">[Name] -&gt; [Name] -&gt; [Name]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">(FieldLabel -&gt; Name) -&gt; [FieldLabel] -&gt; [Name]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">FieldLabel -&gt; Name
forall a. FieldLbl a -&gt; a
</span><a href="GHC.Types.FieldLabel.html#flSelector"><span class="hs-identifier hs-var hs-var">flSelector</span></a></span><span> </span><span class="annot"><span class="annottext">[FieldLabel]
</span><a href="#local-6989586621680835323"><span class="hs-identifier hs-var">fs</span></a></span><span>
</span><span id="line-169"></span><span>
</span><span id="line-170"></span><span class="hs-comment">-- | Names for non-fields made available by the availability information</span><span>
</span><span id="line-171"></span><span class="annot"><a href="GHC.Types.Avail.html#availNonFldNames"><span class="hs-identifier hs-type">availNonFldNames</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Avail.html#AvailInfo"><span class="hs-identifier hs-type">AvailInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-172"></span><span id="availNonFldNames"><span class="annot"><span class="annottext">availNonFldNames :: AvailInfo -&gt; [Name]
</span><a href="GHC.Types.Avail.html#availNonFldNames"><span class="hs-identifier hs-var hs-var">availNonFldNames</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Avail.html#Avail"><span class="hs-identifier hs-type">Avail</span></a></span><span> </span><span id="local-6989586621680835322"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680835322"><span class="hs-identifier hs-var">n</span></a></span></span><span class="hs-special">)</span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680835322"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-173"></span><span class="annot"><a href="GHC.Types.Avail.html#availNonFldNames"><span class="hs-identifier hs-var">availNonFldNames</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Avail.html#AvailTC"><span class="hs-identifier hs-type">AvailTC</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680835321"><span class="annot"><span class="annottext">[Name]
</span><a href="#local-6989586621680835321"><span class="hs-identifier hs-var">ns</span></a></span></span><span> </span><span class="annot"><span class="annottext">[FieldLabel]
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Name]
</span><a href="#local-6989586621680835321"><span class="hs-identifier hs-var">ns</span></a></span><span>
</span><span id="line-174"></span><span>
</span><span id="line-175"></span><span class="hs-comment">-- | Fields made available by the availability information</span><span>
</span><span id="line-176"></span><span class="annot"><a href="GHC.Types.Avail.html#availFlds"><span class="hs-identifier hs-type">availFlds</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Avail.html#AvailInfo"><span class="hs-identifier hs-type">AvailInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.FieldLabel.html#FieldLabel"><span class="hs-identifier hs-type">FieldLabel</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-177"></span><span id="availFlds"><span class="annot"><span class="annottext">availFlds :: AvailInfo -&gt; [FieldLabel]
</span><a href="GHC.Types.Avail.html#availFlds"><span class="hs-identifier hs-var hs-var">availFlds</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Avail.html#AvailTC"><span class="hs-identifier hs-type">AvailTC</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">[Name]
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680835320"><span class="annot"><span class="annottext">[FieldLabel]
</span><a href="#local-6989586621680835320"><span class="hs-identifier hs-var">fs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[FieldLabel]
</span><a href="#local-6989586621680835320"><span class="hs-identifier hs-var">fs</span></a></span><span>
</span><span id="line-178"></span><span class="annot"><a href="GHC.Types.Avail.html#availFlds"><span class="hs-identifier hs-var">availFlds</span></a></span><span> </span><span class="annot"><span class="annottext">AvailInfo
</span><span class="hs-identifier">_</span></span><span>                </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-179"></span><span>
</span><span id="line-180"></span><span class="annot"><a href="GHC.Types.Avail.html#availsNamesWithOccs"><span class="hs-identifier hs-type">availsNamesWithOccs</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.Avail.html#AvailInfo"><span class="hs-identifier hs-type">AvailInfo</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Name.Occurrence.html#OccName"><span class="hs-identifier hs-type">OccName</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span>
</span><span id="line-181"></span><span id="availsNamesWithOccs"><span class="annot"><span class="annottext">availsNamesWithOccs :: [AvailInfo] -&gt; [(Name, OccName)]
</span><a href="GHC.Types.Avail.html#availsNamesWithOccs"><span class="hs-identifier hs-var hs-var">availsNamesWithOccs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(AvailInfo -&gt; [(Name, OccName)])
-&gt; [AvailInfo] -&gt; [(Name, OccName)]
forall (t :: * -&gt; *) a b. Foldable t =&gt; (a -&gt; [b]) -&gt; t a -&gt; [b]
</span><a href="../../base/src/Data.Foldable.html#concatMap"><span class="hs-identifier hs-var">concatMap</span></a></span><span> </span><span class="annot"><span class="annottext">AvailInfo -&gt; [(Name, OccName)]
</span><a href="GHC.Types.Avail.html#availNamesWithOccs"><span class="hs-identifier hs-var">availNamesWithOccs</span></a></span><span>
</span><span id="line-182"></span><span>
</span><span id="line-183"></span><span class="hs-comment">-- | 'Name's made available by the availability information, paired with</span><span>
</span><span id="line-184"></span><span class="hs-comment">-- the 'OccName' used to refer to each one.</span><span>
</span><span id="line-185"></span><span class="hs-comment">--</span><span>
</span><span id="line-186"></span><span class="hs-comment">-- When @DuplicateRecordFields@ is in use, the 'Name' may be the</span><span>
</span><span id="line-187"></span><span class="hs-comment">-- mangled name of a record selector (e.g. @$sel:foo:MkT@) while the</span><span>
</span><span id="line-188"></span><span class="hs-comment">-- 'OccName' will be the label of the field (e.g. @foo@).</span><span>
</span><span id="line-189"></span><span class="hs-comment">--</span><span>
</span><span id="line-190"></span><span class="hs-comment">-- See Note [Representing fields in AvailInfo].</span><span>
</span><span id="line-191"></span><span class="annot"><a href="GHC.Types.Avail.html#availNamesWithOccs"><span class="hs-identifier hs-type">availNamesWithOccs</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Avail.html#AvailInfo"><span class="hs-identifier hs-type">AvailInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Name.Occurrence.html#OccName"><span class="hs-identifier hs-type">OccName</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span>
</span><span id="line-192"></span><span id="availNamesWithOccs"><span class="annot"><span class="annottext">availNamesWithOccs :: AvailInfo -&gt; [(Name, OccName)]
</span><a href="GHC.Types.Avail.html#availNamesWithOccs"><span class="hs-identifier hs-var hs-var">availNamesWithOccs</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Avail.html#Avail"><span class="hs-identifier hs-type">Avail</span></a></span><span> </span><span id="local-6989586621680835318"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680835318"><span class="hs-identifier hs-var">n</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680835318"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Name -&gt; OccName
</span><a href="GHC.Types.Name.html#nameOccName"><span class="hs-identifier hs-var">nameOccName</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680835318"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span>
</span><span id="line-193"></span><span class="annot"><a href="GHC.Types.Avail.html#availNamesWithOccs"><span class="hs-identifier hs-var">availNamesWithOccs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Avail.html#AvailTC"><span class="hs-identifier hs-type">AvailTC</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680835316"><span class="annot"><span class="annottext">[Name]
</span><a href="#local-6989586621680835316"><span class="hs-identifier hs-var">ns</span></a></span></span><span> </span><span id="local-6989586621680835315"><span class="annot"><span class="annottext">[FieldLabel]
</span><a href="#local-6989586621680835315"><span class="hs-identifier hs-var">fs</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-194"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680835314"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Name -&gt; OccName
</span><a href="GHC.Types.Name.html#nameOccName"><span class="hs-identifier hs-var">nameOccName</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680835314"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">|</span><span> </span><span id="local-6989586621680835314"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680835314"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[Name]
</span><a href="#local-6989586621680835316"><span class="hs-identifier hs-var">ns</span></a></span><span> </span><span class="hs-special">]</span><span> </span><span class="annot"><span class="annottext">[(Name, OccName)] -&gt; [(Name, OccName)] -&gt; [(Name, OccName)]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span>
</span><span id="line-195"></span><span>    </span><span class="hs-special">[</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FieldLabel -&gt; Name
forall a. FieldLbl a -&gt; a
</span><a href="GHC.Types.FieldLabel.html#flSelector"><span class="hs-identifier hs-var hs-var">flSelector</span></a></span><span> </span><span class="annot"><span class="annottext">FieldLabel
</span><a href="#local-6989586621680835313"><span class="hs-identifier hs-var">fl</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">FieldLabelString -&gt; OccName
</span><a href="GHC.Types.Name.Occurrence.html#mkVarOccFS"><span class="hs-identifier hs-var">mkVarOccFS</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FieldLabel -&gt; FieldLabelString
forall a. FieldLbl a -&gt; FieldLabelString
</span><a href="GHC.Types.FieldLabel.html#flLabel"><span class="hs-identifier hs-var hs-var">flLabel</span></a></span><span> </span><span class="annot"><span class="annottext">FieldLabel
</span><a href="#local-6989586621680835313"><span class="hs-identifier hs-var">fl</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">|</span><span> </span><span id="local-6989586621680835313"><span class="annot"><span class="annottext">FieldLabel
</span><a href="#local-6989586621680835313"><span class="hs-identifier hs-var">fl</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[FieldLabel]
</span><a href="#local-6989586621680835315"><span class="hs-identifier hs-var">fs</span></a></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-196"></span><span>
</span><span id="line-197"></span><span class="hs-comment">-- -----------------------------------------------------------------------------</span><span>
</span><span id="line-198"></span><span class="hs-comment">-- Utility</span><span>
</span><span id="line-199"></span><span>
</span><span id="line-200"></span><span class="annot"><a href="GHC.Types.Avail.html#plusAvail"><span class="hs-identifier hs-type">plusAvail</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Avail.html#AvailInfo"><span class="hs-identifier hs-type">AvailInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Avail.html#AvailInfo"><span class="hs-identifier hs-type">AvailInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Avail.html#AvailInfo"><span class="hs-identifier hs-type">AvailInfo</span></a></span><span>
</span><span id="line-201"></span><span id="plusAvail"><span class="annot"><span class="annottext">plusAvail :: AvailInfo -&gt; AvailInfo -&gt; AvailInfo
</span><a href="GHC.Types.Avail.html#plusAvail"><span class="hs-identifier hs-var hs-var">plusAvail</span></a></span></span><span> </span><span id="local-6989586621680835310"><span class="annot"><span class="annottext">AvailInfo
</span><a href="#local-6989586621680835310"><span class="hs-identifier hs-var">a1</span></a></span></span><span> </span><span id="local-6989586621680835309"><span class="annot"><span class="annottext">AvailInfo
</span><a href="#local-6989586621680835309"><span class="hs-identifier hs-var">a2</span></a></span></span><span>
</span><span id="line-202"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="GHC.Utils.Misc.html#debugIsOn"><span class="hs-identifier hs-var">debugIsOn</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span> </span><span class="annot"><span class="annottext">AvailInfo -&gt; Name
</span><a href="GHC.Types.Avail.html#availName"><span class="hs-identifier hs-var">availName</span></a></span><span> </span><span class="annot"><span class="annottext">AvailInfo
</span><a href="#local-6989586621680835310"><span class="hs-identifier hs-var">a1</span></a></span><span> </span><span class="annot"><span class="annottext">Name -&gt; Name -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">/=</span></span><span> </span><span class="annot"><span class="annottext">AvailInfo -&gt; Name
</span><a href="GHC.Types.Avail.html#availName"><span class="hs-identifier hs-var">availName</span></a></span><span> </span><span class="annot"><span class="annottext">AvailInfo
</span><a href="#local-6989586621680835309"><span class="hs-identifier hs-var">a2</span></a></span><span>
</span><span id="line-203"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc -&gt; AvailInfo
forall a. HasCallStack =&gt; String -&gt; SDoc -&gt; a
</span><a href="GHC.Utils.Outputable.html#pprPanic"><span class="hs-identifier hs-var">pprPanic</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;GHC.Rename.Env.plusAvail names differ&quot;</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[SDoc] -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#hsep"><span class="hs-identifier hs-var">hsep</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">AvailInfo -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">AvailInfo
</span><a href="#local-6989586621680835310"><span class="hs-identifier hs-var">a1</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">AvailInfo -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">AvailInfo
</span><a href="#local-6989586621680835309"><span class="hs-identifier hs-var">a2</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-204"></span><span class="annot"><a href="GHC.Types.Avail.html#plusAvail"><span class="hs-identifier hs-var">plusAvail</span></a></span><span> </span><span id="local-6989586621680835302"><span class="annot"><span class="annottext">a1 :: AvailInfo
</span><a href="#local-6989586621680835302"><span class="hs-identifier hs-var">a1</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Avail.html#Avail"><span class="hs-identifier hs-type">Avail</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">)</span><span>         </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Avail.html#Avail"><span class="hs-identifier hs-type">Avail</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">)</span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">AvailInfo
</span><a href="#local-6989586621680835302"><span class="hs-identifier hs-var">a1</span></a></span><span>
</span><span id="line-205"></span><span class="annot"><a href="GHC.Types.Avail.html#plusAvail"><span class="hs-identifier hs-var">plusAvail</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Avail.html#AvailTC"><span class="hs-identifier hs-type">AvailTC</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">)</span><span>     </span><span id="local-6989586621680835301"><span class="annot"><span class="annottext">a2 :: AvailInfo
</span><a href="#local-6989586621680835301"><span class="hs-identifier hs-var">a2</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Avail.html#AvailTC"><span class="hs-identifier hs-type">AvailTC</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">)</span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">AvailInfo
</span><a href="#local-6989586621680835301"><span class="hs-identifier hs-var">a2</span></a></span><span>
</span><span id="line-206"></span><span class="annot"><a href="GHC.Types.Avail.html#plusAvail"><span class="hs-identifier hs-var">plusAvail</span></a></span><span> </span><span id="local-6989586621680835300"><span class="annot"><span class="annottext">a1 :: AvailInfo
</span><a href="#local-6989586621680835300"><span class="hs-identifier hs-var">a1</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Avail.html#AvailTC"><span class="hs-identifier hs-type">AvailTC</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">)</span><span>       </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Avail.html#AvailTC"><span class="hs-identifier hs-type">AvailTC</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">AvailInfo
</span><a href="#local-6989586621680835300"><span class="hs-identifier hs-var">a1</span></a></span><span>
</span><span id="line-207"></span><span class="annot"><a href="GHC.Types.Avail.html#plusAvail"><span class="hs-identifier hs-var">plusAvail</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Avail.html#AvailTC"><span class="hs-identifier hs-type">AvailTC</span></a></span><span> </span><span id="local-6989586621680835299"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680835299"><span class="hs-identifier hs-var">n1</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621680835298"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680835298"><span class="hs-identifier hs-var">s1</span></a></span></span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span id="local-6989586621680835297"><span class="annot"><span class="annottext">[Name]
</span><a href="#local-6989586621680835297"><span class="hs-identifier hs-var">ss1</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621680835296"><span class="annot"><span class="annottext">[FieldLabel]
</span><a href="#local-6989586621680835296"><span class="hs-identifier hs-var">fs1</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Avail.html#AvailTC"><span class="hs-identifier hs-type">AvailTC</span></a></span><span> </span><span id="local-6989586621680835295"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680835295"><span class="hs-identifier hs-var">n2</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621680835294"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680835294"><span class="hs-identifier hs-var">s2</span></a></span></span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span id="local-6989586621680835293"><span class="annot"><span class="annottext">[Name]
</span><a href="#local-6989586621680835293"><span class="hs-identifier hs-var">ss2</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621680835292"><span class="annot"><span class="annottext">[FieldLabel]
</span><a href="#local-6989586621680835292"><span class="hs-identifier hs-var">fs2</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-208"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680835299"><span class="hs-identifier hs-var">n1</span></a></span><span class="annot"><span class="annottext">Name -&gt; Name -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680835298"><span class="hs-identifier hs-var">s1</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680835295"><span class="hs-identifier hs-var">n2</span></a></span><span class="annot"><span class="annottext">Name -&gt; Name -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680835294"><span class="hs-identifier hs-var">s2</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">of</span><span>  </span><span class="hs-comment">-- Maintain invariant the parent is first</span><span>
</span><span id="line-209"></span><span>       </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span class="hs-special">)</span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Name -&gt; [Name] -&gt; [FieldLabel] -&gt; AvailInfo
</span><a href="GHC.Types.Avail.html#AvailTC"><span class="hs-identifier hs-var">AvailTC</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680835299"><span class="hs-identifier hs-var">n1</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680835298"><span class="hs-identifier hs-var">s1</span></a></span><span> </span><span class="annot"><span class="annottext">Name -&gt; [Name] -&gt; [Name]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[Name]
</span><a href="#local-6989586621680835297"><span class="hs-identifier hs-var">ss1</span></a></span><span> </span><span class="annot"><span class="annottext">[Name] -&gt; [Name] -&gt; [Name]
forall a.
(HasDebugCallStack, Outputable a, Eq a) =&gt;
[a] -&gt; [a] -&gt; [a]
</span><a href="GHC.Data.List.SetOps.html#unionLists"><span class="hs-operator hs-var">`unionLists`</span></a></span><span> </span><span class="annot"><span class="annottext">[Name]
</span><a href="#local-6989586621680835293"><span class="hs-identifier hs-var">ss2</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-210"></span><span>                                   </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[FieldLabel]
</span><a href="#local-6989586621680835296"><span class="hs-identifier hs-var">fs1</span></a></span><span> </span><span class="annot"><span class="annottext">[FieldLabel] -&gt; [FieldLabel] -&gt; [FieldLabel]
forall a.
(HasDebugCallStack, Outputable a, Eq a) =&gt;
[a] -&gt; [a] -&gt; [a]
</span><a href="GHC.Data.List.SetOps.html#unionLists"><span class="hs-operator hs-var">`unionLists`</span></a></span><span> </span><span class="annot"><span class="annottext">[FieldLabel]
</span><a href="#local-6989586621680835292"><span class="hs-identifier hs-var">fs2</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-211"></span><span>       </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span class="hs-special">)</span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Name -&gt; [Name] -&gt; [FieldLabel] -&gt; AvailInfo
</span><a href="GHC.Types.Avail.html#AvailTC"><span class="hs-identifier hs-var">AvailTC</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680835299"><span class="hs-identifier hs-var">n1</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680835298"><span class="hs-identifier hs-var">s1</span></a></span><span> </span><span class="annot"><span class="annottext">Name -&gt; [Name] -&gt; [Name]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[Name]
</span><a href="#local-6989586621680835297"><span class="hs-identifier hs-var">ss1</span></a></span><span> </span><span class="annot"><span class="annottext">[Name] -&gt; [Name] -&gt; [Name]
forall a.
(HasDebugCallStack, Outputable a, Eq a) =&gt;
[a] -&gt; [a] -&gt; [a]
</span><a href="GHC.Data.List.SetOps.html#unionLists"><span class="hs-operator hs-var">`unionLists`</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680835294"><span class="hs-identifier hs-var">s2</span></a></span><span class="annot"><span class="annottext">Name -&gt; [Name] -&gt; [Name]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span class="annot"><span class="annottext">[Name]
</span><a href="#local-6989586621680835293"><span class="hs-identifier hs-var">ss2</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-212"></span><span>                                   </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[FieldLabel]
</span><a href="#local-6989586621680835296"><span class="hs-identifier hs-var">fs1</span></a></span><span> </span><span class="annot"><span class="annottext">[FieldLabel] -&gt; [FieldLabel] -&gt; [FieldLabel]
forall a.
(HasDebugCallStack, Outputable a, Eq a) =&gt;
[a] -&gt; [a] -&gt; [a]
</span><a href="GHC.Data.List.SetOps.html#unionLists"><span class="hs-operator hs-var">`unionLists`</span></a></span><span> </span><span class="annot"><span class="annottext">[FieldLabel]
</span><a href="#local-6989586621680835292"><span class="hs-identifier hs-var">fs2</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-213"></span><span>       </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span class="hs-special">)</span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Name -&gt; [Name] -&gt; [FieldLabel] -&gt; AvailInfo
</span><a href="GHC.Types.Avail.html#AvailTC"><span class="hs-identifier hs-var">AvailTC</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680835299"><span class="hs-identifier hs-var">n1</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680835294"><span class="hs-identifier hs-var">s2</span></a></span><span> </span><span class="annot"><span class="annottext">Name -&gt; [Name] -&gt; [Name]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680835298"><span class="hs-identifier hs-var">s1</span></a></span><span class="annot"><span class="annottext">Name -&gt; [Name] -&gt; [Name]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span class="annot"><span class="annottext">[Name]
</span><a href="#local-6989586621680835297"><span class="hs-identifier hs-var">ss1</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[Name] -&gt; [Name] -&gt; [Name]
forall a.
(HasDebugCallStack, Outputable a, Eq a) =&gt;
[a] -&gt; [a] -&gt; [a]
</span><a href="GHC.Data.List.SetOps.html#unionLists"><span class="hs-operator hs-var">`unionLists`</span></a></span><span> </span><span class="annot"><span class="annottext">[Name]
</span><a href="#local-6989586621680835293"><span class="hs-identifier hs-var">ss2</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-214"></span><span>                                   </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[FieldLabel]
</span><a href="#local-6989586621680835296"><span class="hs-identifier hs-var">fs1</span></a></span><span> </span><span class="annot"><span class="annottext">[FieldLabel] -&gt; [FieldLabel] -&gt; [FieldLabel]
forall a.
(HasDebugCallStack, Outputable a, Eq a) =&gt;
[a] -&gt; [a] -&gt; [a]
</span><a href="GHC.Data.List.SetOps.html#unionLists"><span class="hs-operator hs-var">`unionLists`</span></a></span><span> </span><span class="annot"><span class="annottext">[FieldLabel]
</span><a href="#local-6989586621680835292"><span class="hs-identifier hs-var">fs2</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-215"></span><span>       </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Name -&gt; [Name] -&gt; [FieldLabel] -&gt; AvailInfo
</span><a href="GHC.Types.Avail.html#AvailTC"><span class="hs-identifier hs-var">AvailTC</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680835299"><span class="hs-identifier hs-var">n1</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680835298"><span class="hs-identifier hs-var">s1</span></a></span><span class="annot"><span class="annottext">Name -&gt; [Name] -&gt; [Name]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span class="annot"><span class="annottext">[Name]
</span><a href="#local-6989586621680835297"><span class="hs-identifier hs-var">ss1</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[Name] -&gt; [Name] -&gt; [Name]
forall a.
(HasDebugCallStack, Outputable a, Eq a) =&gt;
[a] -&gt; [a] -&gt; [a]
</span><a href="GHC.Data.List.SetOps.html#unionLists"><span class="hs-operator hs-var">`unionLists`</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680835294"><span class="hs-identifier hs-var">s2</span></a></span><span class="annot"><span class="annottext">Name -&gt; [Name] -&gt; [Name]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span class="annot"><span class="annottext">[Name]
</span><a href="#local-6989586621680835293"><span class="hs-identifier hs-var">ss2</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-216"></span><span>                                   </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[FieldLabel]
</span><a href="#local-6989586621680835296"><span class="hs-identifier hs-var">fs1</span></a></span><span> </span><span class="annot"><span class="annottext">[FieldLabel] -&gt; [FieldLabel] -&gt; [FieldLabel]
forall a.
(HasDebugCallStack, Outputable a, Eq a) =&gt;
[a] -&gt; [a] -&gt; [a]
</span><a href="GHC.Data.List.SetOps.html#unionLists"><span class="hs-operator hs-var">`unionLists`</span></a></span><span> </span><span class="annot"><span class="annottext">[FieldLabel]
</span><a href="#local-6989586621680835292"><span class="hs-identifier hs-var">fs2</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-217"></span><span class="annot"><a href="GHC.Types.Avail.html#plusAvail"><span class="hs-identifier hs-var">plusAvail</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Avail.html#AvailTC"><span class="hs-identifier hs-type">AvailTC</span></a></span><span> </span><span id="local-6989586621680835290"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680835290"><span class="hs-identifier hs-var">n1</span></a></span></span><span> </span><span id="local-6989586621680835289"><span class="annot"><span class="annottext">[Name]
</span><a href="#local-6989586621680835289"><span class="hs-identifier hs-var">ss1</span></a></span></span><span> </span><span id="local-6989586621680835288"><span class="annot"><span class="annottext">[FieldLabel]
</span><a href="#local-6989586621680835288"><span class="hs-identifier hs-var">fs1</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Avail.html#AvailTC"><span class="hs-identifier hs-type">AvailTC</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span id="local-6989586621680835287"><span class="annot"><span class="annottext">[FieldLabel]
</span><a href="#local-6989586621680835287"><span class="hs-identifier hs-var">fs2</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-218"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Name -&gt; [Name] -&gt; [FieldLabel] -&gt; AvailInfo
</span><a href="GHC.Types.Avail.html#AvailTC"><span class="hs-identifier hs-var">AvailTC</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680835290"><span class="hs-identifier hs-var">n1</span></a></span><span> </span><span class="annot"><span class="annottext">[Name]
</span><a href="#local-6989586621680835289"><span class="hs-identifier hs-var">ss1</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[FieldLabel]
</span><a href="#local-6989586621680835288"><span class="hs-identifier hs-var">fs1</span></a></span><span> </span><span class="annot"><span class="annottext">[FieldLabel] -&gt; [FieldLabel] -&gt; [FieldLabel]
forall a.
(HasDebugCallStack, Outputable a, Eq a) =&gt;
[a] -&gt; [a] -&gt; [a]
</span><a href="GHC.Data.List.SetOps.html#unionLists"><span class="hs-operator hs-var">`unionLists`</span></a></span><span> </span><span class="annot"><span class="annottext">[FieldLabel]
</span><a href="#local-6989586621680835287"><span class="hs-identifier hs-var">fs2</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-219"></span><span class="annot"><a href="GHC.Types.Avail.html#plusAvail"><span class="hs-identifier hs-var">plusAvail</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Avail.html#AvailTC"><span class="hs-identifier hs-type">AvailTC</span></a></span><span> </span><span id="local-6989586621680835286"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680835286"><span class="hs-identifier hs-var">n1</span></a></span></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span id="local-6989586621680835285"><span class="annot"><span class="annottext">[FieldLabel]
</span><a href="#local-6989586621680835285"><span class="hs-identifier hs-var">fs1</span></a></span></span><span class="hs-special">)</span><span>  </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Avail.html#AvailTC"><span class="hs-identifier hs-type">AvailTC</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680835284"><span class="annot"><span class="annottext">[Name]
</span><a href="#local-6989586621680835284"><span class="hs-identifier hs-var">ss2</span></a></span></span><span> </span><span id="local-6989586621680835283"><span class="annot"><span class="annottext">[FieldLabel]
</span><a href="#local-6989586621680835283"><span class="hs-identifier hs-var">fs2</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-220"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Name -&gt; [Name] -&gt; [FieldLabel] -&gt; AvailInfo
</span><a href="GHC.Types.Avail.html#AvailTC"><span class="hs-identifier hs-var">AvailTC</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680835286"><span class="hs-identifier hs-var">n1</span></a></span><span> </span><span class="annot"><span class="annottext">[Name]
</span><a href="#local-6989586621680835284"><span class="hs-identifier hs-var">ss2</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[FieldLabel]
</span><a href="#local-6989586621680835285"><span class="hs-identifier hs-var">fs1</span></a></span><span> </span><span class="annot"><span class="annottext">[FieldLabel] -&gt; [FieldLabel] -&gt; [FieldLabel]
forall a.
(HasDebugCallStack, Outputable a, Eq a) =&gt;
[a] -&gt; [a] -&gt; [a]
</span><a href="GHC.Data.List.SetOps.html#unionLists"><span class="hs-operator hs-var">`unionLists`</span></a></span><span> </span><span class="annot"><span class="annottext">[FieldLabel]
</span><a href="#local-6989586621680835283"><span class="hs-identifier hs-var">fs2</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-221"></span><span class="annot"><a href="GHC.Types.Avail.html#plusAvail"><span class="hs-identifier hs-var">plusAvail</span></a></span><span> </span><span id="local-6989586621680835282"><span class="annot"><span class="annottext">AvailInfo
</span><a href="#local-6989586621680835282"><span class="hs-identifier hs-var">a1</span></a></span></span><span> </span><span id="local-6989586621680835281"><span class="annot"><span class="annottext">AvailInfo
</span><a href="#local-6989586621680835281"><span class="hs-identifier hs-var">a2</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc -&gt; AvailInfo
forall a. HasCallStack =&gt; String -&gt; SDoc -&gt; a
</span><a href="GHC.Utils.Outputable.html#pprPanic"><span class="hs-identifier hs-var">pprPanic</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;GHC.Rename.Env.plusAvail&quot;</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[SDoc] -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#hsep"><span class="hs-identifier hs-var">hsep</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">AvailInfo -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">AvailInfo
</span><a href="#local-6989586621680835282"><span class="hs-identifier hs-var">a1</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">AvailInfo -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">AvailInfo
</span><a href="#local-6989586621680835281"><span class="hs-identifier hs-var">a2</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-222"></span><span>
</span><span id="line-223"></span><span class="hs-comment">-- | trims an 'AvailInfo' to keep only a single name</span><span>
</span><span id="line-224"></span><span class="annot"><a href="GHC.Types.Avail.html#trimAvail"><span class="hs-identifier hs-type">trimAvail</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Avail.html#AvailInfo"><span class="hs-identifier hs-type">AvailInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Avail.html#AvailInfo"><span class="hs-identifier hs-type">AvailInfo</span></a></span><span>
</span><span id="line-225"></span><span id="trimAvail"><span class="annot"><span class="annottext">trimAvail :: AvailInfo -&gt; Name -&gt; AvailInfo
</span><a href="GHC.Types.Avail.html#trimAvail"><span class="hs-identifier hs-var hs-var">trimAvail</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Avail.html#Avail"><span class="hs-identifier hs-type">Avail</span></a></span><span> </span><span id="local-6989586621680835280"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680835280"><span class="hs-identifier hs-var">n</span></a></span></span><span class="hs-special">)</span><span>         </span><span class="annot"><span class="annottext">Name
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Name -&gt; AvailInfo
</span><a href="GHC.Types.Avail.html#Avail"><span class="hs-identifier hs-var">Avail</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680835280"><span class="hs-identifier hs-var">n</span></a></span><span>
</span><span id="line-226"></span><span class="annot"><a href="GHC.Types.Avail.html#trimAvail"><span class="hs-identifier hs-var">trimAvail</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Avail.html#AvailTC"><span class="hs-identifier hs-type">AvailTC</span></a></span><span> </span><span id="local-6989586621680835279"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680835279"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span id="local-6989586621680835278"><span class="annot"><span class="annottext">[Name]
</span><a href="#local-6989586621680835278"><span class="hs-identifier hs-var">ns</span></a></span></span><span> </span><span id="local-6989586621680835277"><span class="annot"><span class="annottext">[FieldLabel]
</span><a href="#local-6989586621680835277"><span class="hs-identifier hs-var">fs</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621680835276"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680835276"><span class="hs-identifier hs-var">m</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">(FieldLabel -&gt; Bool) -&gt; [FieldLabel] -&gt; Maybe FieldLabel
forall (t :: * -&gt; *) a. Foldable t =&gt; (a -&gt; Bool) -&gt; t a -&gt; Maybe a
</span><a href="../../base/src/Data.Foldable.html#find"><span class="hs-identifier hs-var">find</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="annot"><span class="annottext">Name -&gt; Name -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680835276"><span class="hs-identifier hs-var">m</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(Name -&gt; Bool) -&gt; (FieldLabel -&gt; Name) -&gt; FieldLabel -&gt; Bool
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">FieldLabel -&gt; Name
forall a. FieldLbl a -&gt; a
</span><a href="GHC.Types.FieldLabel.html#flSelector"><span class="hs-identifier hs-var hs-var">flSelector</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[FieldLabel]
</span><a href="#local-6989586621680835277"><span class="hs-identifier hs-var">fs</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-227"></span><span>    </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621680835274"><span class="annot"><span class="annottext">FieldLabel
</span><a href="#local-6989586621680835274"><span class="hs-identifier hs-var">x</span></a></span></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Name -&gt; [Name] -&gt; [FieldLabel] -&gt; AvailInfo
</span><a href="GHC.Types.Avail.html#AvailTC"><span class="hs-identifier hs-var">AvailTC</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680835279"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">FieldLabel
</span><a href="#local-6989586621680835274"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-228"></span><span>    </span><span class="annot"><span class="annottext">Maybe FieldLabel
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">ASSERT</span><span class="hs-special">(</span><span> </span><span class="hs-identifier">m</span><span> </span><span class="hs-special">`</span><span class="hs-identifier">elem</span><span class="hs-special">`</span><span> </span><span class="hs-identifier">ns</span><span> </span><span class="hs-special">)</span><span> </span><span class="hs-identifier">AvailTC</span><span> </span><span class="hs-identifier">n</span><span> </span><span class="hs-special">[</span><span class="hs-identifier">m</span><span class="hs-special">]</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-229"></span><span>
</span><span id="line-230"></span><span class="hs-comment">-- | filters 'AvailInfo's by the given predicate</span><span>
</span><span id="line-231"></span><span class="annot"><a href="GHC.Types.Avail.html#filterAvails"><span class="hs-identifier hs-type">filterAvails</span></a></span><span>  </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.Avail.html#AvailInfo"><span class="hs-identifier hs-type">AvailInfo</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.Avail.html#AvailInfo"><span class="hs-identifier hs-type">AvailInfo</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-232"></span><span id="filterAvails"><span class="annot"><span class="annottext">filterAvails :: (Name -&gt; Bool) -&gt; [AvailInfo] -&gt; [AvailInfo]
</span><a href="GHC.Types.Avail.html#filterAvails"><span class="hs-identifier hs-var hs-var">filterAvails</span></a></span></span><span> </span><span id="local-6989586621680835271"><span class="annot"><span class="annottext">Name -&gt; Bool
</span><a href="#local-6989586621680835271"><span class="hs-identifier hs-var">keep</span></a></span></span><span> </span><span id="local-6989586621680835270"><span class="annot"><span class="annottext">[AvailInfo]
</span><a href="#local-6989586621680835270"><span class="hs-identifier hs-var">avails</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(AvailInfo -&gt; [AvailInfo] -&gt; [AvailInfo])
-&gt; [AvailInfo] -&gt; [AvailInfo] -&gt; [AvailInfo]
forall (t :: * -&gt; *) a b.
Foldable t =&gt;
(a -&gt; b -&gt; b) -&gt; b -&gt; t a -&gt; b
</span><a href="../../base/src/Data.Foldable.html#foldr"><span class="hs-identifier hs-var">foldr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(Name -&gt; Bool) -&gt; AvailInfo -&gt; [AvailInfo] -&gt; [AvailInfo]
</span><a href="GHC.Types.Avail.html#filterAvail"><span class="hs-identifier hs-var">filterAvail</span></a></span><span> </span><span class="annot"><span class="annottext">Name -&gt; Bool
</span><a href="#local-6989586621680835271"><span class="hs-identifier hs-var">keep</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="annot"><span class="annottext">[AvailInfo]
</span><a href="#local-6989586621680835270"><span class="hs-identifier hs-var">avails</span></a></span><span>
</span><span id="line-233"></span><span>
</span><span id="line-234"></span><span class="hs-comment">-- | filters an 'AvailInfo' by the given predicate</span><span>
</span><span id="line-235"></span><span class="annot"><a href="GHC.Types.Avail.html#filterAvail"><span class="hs-identifier hs-type">filterAvail</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Avail.html#AvailInfo"><span class="hs-identifier hs-type">AvailInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.Avail.html#AvailInfo"><span class="hs-identifier hs-type">AvailInfo</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.Avail.html#AvailInfo"><span class="hs-identifier hs-type">AvailInfo</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-236"></span><span id="filterAvail"><span class="annot"><span class="annottext">filterAvail :: (Name -&gt; Bool) -&gt; AvailInfo -&gt; [AvailInfo] -&gt; [AvailInfo]
</span><a href="GHC.Types.Avail.html#filterAvail"><span class="hs-identifier hs-var hs-var">filterAvail</span></a></span></span><span> </span><span id="local-6989586621680835269"><span class="annot"><span class="annottext">Name -&gt; Bool
</span><a href="#local-6989586621680835269"><span class="hs-identifier hs-var">keep</span></a></span></span><span> </span><span id="local-6989586621680835268"><span class="annot"><span class="annottext">AvailInfo
</span><a href="#local-6989586621680835268"><span class="hs-identifier hs-var">ie</span></a></span></span><span> </span><span id="local-6989586621680835267"><span class="annot"><span class="annottext">[AvailInfo]
</span><a href="#local-6989586621680835267"><span class="hs-identifier hs-var">rest</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-237"></span><span>  </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">AvailInfo
</span><a href="#local-6989586621680835268"><span class="hs-identifier hs-var">ie</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-238"></span><span>    </span><span class="annot"><a href="GHC.Types.Avail.html#Avail"><span class="hs-identifier hs-type">Avail</span></a></span><span> </span><span id="local-6989586621680835266"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680835266"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Name -&gt; Bool
</span><a href="#local-6989586621680835269"><span class="hs-identifier hs-var">keep</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680835266"><span class="hs-identifier hs-var">n</span></a></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">AvailInfo
</span><a href="#local-6989586621680835268"><span class="hs-identifier hs-var">ie</span></a></span><span> </span><span class="annot"><span class="annottext">AvailInfo -&gt; [AvailInfo] -&gt; [AvailInfo]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">[AvailInfo]
</span><a href="#local-6989586621680835267"><span class="hs-identifier hs-var">rest</span></a></span><span>
</span><span id="line-239"></span><span>            </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">[AvailInfo]
</span><a href="#local-6989586621680835267"><span class="hs-identifier hs-var">rest</span></a></span><span>
</span><span id="line-240"></span><span>    </span><span class="annot"><a href="GHC.Types.Avail.html#AvailTC"><span class="hs-identifier hs-type">AvailTC</span></a></span><span> </span><span id="local-6989586621680835265"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680835265"><span class="hs-identifier hs-var">tc</span></a></span></span><span> </span><span id="local-6989586621680835264"><span class="annot"><span class="annottext">[Name]
</span><a href="#local-6989586621680835264"><span class="hs-identifier hs-var">ns</span></a></span></span><span> </span><span id="local-6989586621680835263"><span class="annot"><span class="annottext">[FieldLabel]
</span><a href="#local-6989586621680835263"><span class="hs-identifier hs-var">fs</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-241"></span><span>        </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621680835262"><span class="annot"><span class="annottext">ns' :: [Name]
</span><a href="#local-6989586621680835262"><span class="hs-identifier hs-var hs-var">ns'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Name -&gt; Bool) -&gt; [Name] -&gt; [Name]
forall a. (a -&gt; Bool) -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.List.html#filter"><span class="hs-identifier hs-var">filter</span></a></span><span> </span><span class="annot"><span class="annottext">Name -&gt; Bool
</span><a href="#local-6989586621680835269"><span class="hs-identifier hs-var">keep</span></a></span><span> </span><span class="annot"><span class="annottext">[Name]
</span><a href="#local-6989586621680835264"><span class="hs-identifier hs-var">ns</span></a></span><span>
</span><span id="line-242"></span><span>            </span><span id="local-6989586621680835261"><span class="annot"><span class="annottext">fs' :: [FieldLabel]
</span><a href="#local-6989586621680835261"><span class="hs-identifier hs-var hs-var">fs'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(FieldLabel -&gt; Bool) -&gt; [FieldLabel] -&gt; [FieldLabel]
forall a. (a -&gt; Bool) -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.List.html#filter"><span class="hs-identifier hs-var">filter</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Name -&gt; Bool
</span><a href="#local-6989586621680835269"><span class="hs-identifier hs-var">keep</span></a></span><span> </span><span class="annot"><span class="annottext">(Name -&gt; Bool) -&gt; (FieldLabel -&gt; Name) -&gt; FieldLabel -&gt; Bool
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">FieldLabel -&gt; Name
forall a. FieldLbl a -&gt; a
</span><a href="GHC.Types.FieldLabel.html#flSelector"><span class="hs-identifier hs-var hs-var">flSelector</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[FieldLabel]
</span><a href="#local-6989586621680835263"><span class="hs-identifier hs-var">fs</span></a></span><span> </span><span class="hs-keyword">in</span><span>
</span><span id="line-243"></span><span>        </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">[Name] -&gt; Bool
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#null"><span class="hs-identifier hs-var">null</span></a></span><span> </span><span class="annot"><span class="annottext">[Name]
</span><a href="#local-6989586621680835262"><span class="hs-identifier hs-var">ns'</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span> </span><span class="annot"><span class="annottext">[FieldLabel] -&gt; Bool
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#null"><span class="hs-identifier hs-var">null</span></a></span><span> </span><span class="annot"><span class="annottext">[FieldLabel]
</span><a href="#local-6989586621680835261"><span class="hs-identifier hs-var">fs'</span></a></span><span> </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">[AvailInfo]
</span><a href="#local-6989586621680835267"><span class="hs-identifier hs-var">rest</span></a></span><span> </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">Name -&gt; [Name] -&gt; [FieldLabel] -&gt; AvailInfo
</span><a href="GHC.Types.Avail.html#AvailTC"><span class="hs-identifier hs-var">AvailTC</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680835265"><span class="hs-identifier hs-var">tc</span></a></span><span> </span><span class="annot"><span class="annottext">[Name]
</span><a href="#local-6989586621680835262"><span class="hs-identifier hs-var">ns'</span></a></span><span> </span><span class="annot"><span class="annottext">[FieldLabel]
</span><a href="#local-6989586621680835261"><span class="hs-identifier hs-var">fs'</span></a></span><span> </span><span class="annot"><span class="annottext">AvailInfo -&gt; [AvailInfo] -&gt; [AvailInfo]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">[AvailInfo]
</span><a href="#local-6989586621680835267"><span class="hs-identifier hs-var">rest</span></a></span><span>
</span><span id="line-244"></span><span>
</span><span id="line-245"></span><span>
</span><span id="line-246"></span><span class="hs-comment">-- | Combines 'AvailInfo's from the same family</span><span>
</span><span id="line-247"></span><span class="hs-comment">-- 'avails' may have several items with the same availName</span><span>
</span><span id="line-248"></span><span class="hs-comment">-- E.g  import Ix( Ix(..), index )</span><span>
</span><span id="line-249"></span><span class="hs-comment">-- will give Ix(Ix,index,range) and Ix(index)</span><span>
</span><span id="line-250"></span><span class="hs-comment">-- We want to combine these; addAvail does that</span><span>
</span><span id="line-251"></span><span class="annot"><a href="GHC.Types.Avail.html#nubAvails"><span class="hs-identifier hs-type">nubAvails</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.Avail.html#AvailInfo"><span class="hs-identifier hs-type">AvailInfo</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.Avail.html#AvailInfo"><span class="hs-identifier hs-type">AvailInfo</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-252"></span><span id="nubAvails"><span class="annot"><span class="annottext">nubAvails :: [AvailInfo] -&gt; [AvailInfo]
</span><a href="GHC.Types.Avail.html#nubAvails"><span class="hs-identifier hs-var hs-var">nubAvails</span></a></span></span><span> </span><span id="local-6989586621680835259"><span class="annot"><span class="annottext">[AvailInfo]
</span><a href="#local-6989586621680835259"><span class="hs-identifier hs-var">avails</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">NameEnv AvailInfo -&gt; [AvailInfo]
forall a. NameEnv a -&gt; [a]
</span><a href="GHC.Types.Name.Env.html#nameEnvElts"><span class="hs-identifier hs-var">nameEnvElts</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(NameEnv AvailInfo -&gt; AvailInfo -&gt; NameEnv AvailInfo)
-&gt; NameEnv AvailInfo -&gt; [AvailInfo] -&gt; NameEnv AvailInfo
forall (t :: * -&gt; *) b a.
Foldable t =&gt;
(b -&gt; a -&gt; b) -&gt; b -&gt; t a -&gt; b
</span><a href="../../base/src/Data.Foldable.html#foldl%27"><span class="hs-identifier hs-var">foldl'</span></a></span><span> </span><span class="annot"><span class="annottext">NameEnv AvailInfo -&gt; AvailInfo -&gt; NameEnv AvailInfo
</span><a href="#local-6989586621680835256"><span class="hs-identifier hs-var">add</span></a></span><span> </span><span class="annot"><span class="annottext">NameEnv AvailInfo
forall a. NameEnv a
</span><a href="GHC.Types.Name.Env.html#emptyNameEnv"><span class="hs-identifier hs-var">emptyNameEnv</span></a></span><span> </span><span class="annot"><span class="annottext">[AvailInfo]
</span><a href="#local-6989586621680835259"><span class="hs-identifier hs-var">avails</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-253"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-254"></span><span>    </span><span id="local-6989586621680835256"><span class="annot"><span class="annottext">add :: NameEnv AvailInfo -&gt; AvailInfo -&gt; NameEnv AvailInfo
</span><a href="#local-6989586621680835256"><span class="hs-identifier hs-var hs-var">add</span></a></span></span><span> </span><span id="local-6989586621680835255"><span class="annot"><span class="annottext">NameEnv AvailInfo
</span><a href="#local-6989586621680835255"><span class="hs-identifier hs-var">env</span></a></span></span><span> </span><span id="local-6989586621680835254"><span class="annot"><span class="annottext">AvailInfo
</span><a href="#local-6989586621680835254"><span class="hs-identifier hs-var">avail</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(AvailInfo -&gt; AvailInfo -&gt; AvailInfo)
-&gt; NameEnv AvailInfo -&gt; Name -&gt; AvailInfo -&gt; NameEnv AvailInfo
forall a. (a -&gt; a -&gt; a) -&gt; NameEnv a -&gt; Name -&gt; a -&gt; NameEnv a
</span><a href="GHC.Types.Name.Env.html#extendNameEnv_C"><span class="hs-identifier hs-var">extendNameEnv_C</span></a></span><span> </span><span class="annot"><span class="annottext">AvailInfo -&gt; AvailInfo -&gt; AvailInfo
</span><a href="GHC.Types.Avail.html#plusAvail"><span class="hs-identifier hs-var">plusAvail</span></a></span><span> </span><span class="annot"><span class="annottext">NameEnv AvailInfo
</span><a href="#local-6989586621680835255"><span class="hs-identifier hs-var">env</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">AvailInfo -&gt; Name
</span><a href="GHC.Types.Avail.html#availName"><span class="hs-identifier hs-var">availName</span></a></span><span> </span><span class="annot"><span class="annottext">AvailInfo
</span><a href="#local-6989586621680835254"><span class="hs-identifier hs-var">avail</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">AvailInfo
</span><a href="#local-6989586621680835254"><span class="hs-identifier hs-var">avail</span></a></span><span>
</span><span id="line-255"></span><span>
</span><span id="line-256"></span><span class="hs-comment">-- -----------------------------------------------------------------------------</span><span>
</span><span id="line-257"></span><span class="hs-comment">-- Printing</span><span>
</span><span id="line-258"></span><span>
</span><span id="line-259"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621680835250"><span class="annot"><a href="GHC.Utils.Outputable.html#Outputable"><span class="hs-identifier hs-type">Outputable</span></a></span><span> </span><span class="annot"><a href="GHC.Types.Avail.html#AvailInfo"><span class="hs-identifier hs-type">AvailInfo</span></a></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-260"></span><span>   </span><span id="local-6989586621680835248"><span class="annot"><span class="annottext">ppr :: AvailInfo -&gt; SDoc
</span><a href="#local-6989586621680835248"><span class="hs-identifier hs-var hs-var hs-var hs-var">ppr</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">AvailInfo -&gt; SDoc
</span><a href="GHC.Types.Avail.html#pprAvail"><span class="hs-identifier hs-var">pprAvail</span></a></span><span>
</span><span id="line-261"></span><span>
</span><span id="line-262"></span><span class="annot"><a href="GHC.Types.Avail.html#pprAvail"><span class="hs-identifier hs-type">pprAvail</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Avail.html#AvailInfo"><span class="hs-identifier hs-type">AvailInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span>
</span><span id="line-263"></span><span id="pprAvail"><span class="annot"><span class="annottext">pprAvail :: AvailInfo -&gt; SDoc
</span><a href="GHC.Types.Avail.html#pprAvail"><span class="hs-identifier hs-var hs-var">pprAvail</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Avail.html#Avail"><span class="hs-identifier hs-type">Avail</span></a></span><span> </span><span id="local-6989586621680835246"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680835246"><span class="hs-identifier hs-var">n</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-264"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Name -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680835246"><span class="hs-identifier hs-var">n</span></a></span><span>
</span><span id="line-265"></span><span class="annot"><a href="GHC.Types.Avail.html#pprAvail"><span class="hs-identifier hs-var">pprAvail</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Avail.html#AvailTC"><span class="hs-identifier hs-type">AvailTC</span></a></span><span> </span><span id="local-6989586621680835245"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680835245"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span id="local-6989586621680835244"><span class="annot"><span class="annottext">[Name]
</span><a href="#local-6989586621680835244"><span class="hs-identifier hs-var">ns</span></a></span></span><span> </span><span id="local-6989586621680835243"><span class="annot"><span class="annottext">[FieldLabel]
</span><a href="#local-6989586621680835243"><span class="hs-identifier hs-var">fs</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-266"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Name -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680835245"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#braces"><span class="hs-identifier hs-var">braces</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[SDoc] -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#sep"><span class="hs-identifier hs-var">sep</span></a></span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">[SDoc] -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#fsep"><span class="hs-identifier hs-var">fsep</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">SDoc -&gt; [SDoc] -&gt; [SDoc]
</span><a href="GHC.Utils.Outputable.html#punctuate"><span class="hs-identifier hs-var">punctuate</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc
</span><a href="GHC.Utils.Outputable.html#comma"><span class="hs-identifier hs-var">comma</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(Name -&gt; SDoc) -&gt; [Name] -&gt; [SDoc]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">Name -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">[Name]
</span><a href="#local-6989586621680835244"><span class="hs-identifier hs-var">ns</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc
</span><a href="GHC.Utils.Outputable.html#semi"><span class="hs-identifier hs-var">semi</span></a></span><span>
</span><span id="line-267"></span><span>                         </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[SDoc] -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#fsep"><span class="hs-identifier hs-var">fsep</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">SDoc -&gt; [SDoc] -&gt; [SDoc]
</span><a href="GHC.Utils.Outputable.html#punctuate"><span class="hs-identifier hs-var">punctuate</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc
</span><a href="GHC.Utils.Outputable.html#comma"><span class="hs-identifier hs-var">comma</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(FieldLabel -&gt; SDoc) -&gt; [FieldLabel] -&gt; [SDoc]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FieldLabelString -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">(FieldLabelString -&gt; SDoc)
-&gt; (FieldLabel -&gt; FieldLabelString) -&gt; FieldLabel -&gt; SDoc
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">FieldLabel -&gt; FieldLabelString
forall a. FieldLbl a -&gt; FieldLabelString
</span><a href="GHC.Types.FieldLabel.html#flLabel"><span class="hs-identifier hs-var hs-var">flLabel</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[FieldLabel]
</span><a href="#local-6989586621680835243"><span class="hs-identifier hs-var">fs</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-268"></span><span>
</span><span id="line-269"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621680835233"><span class="annot"><a href="GHC.Utils.Binary.html#Binary"><span class="hs-identifier hs-type">Binary</span></a></span><span> </span><span class="annot"><a href="GHC.Types.Avail.html#AvailInfo"><span class="hs-identifier hs-type">AvailInfo</span></a></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-270"></span><span>    </span><span id="local-6989586621680835214"><span class="annot"><span class="annottext">put_ :: BinHandle -&gt; AvailInfo -&gt; IO ()
</span><a href="GHC.Utils.Binary.html#put_"><span class="hs-identifier hs-var hs-var hs-var hs-var">put_</span></a></span></span><span> </span><span id="local-6989586621680835212"><span class="annot"><span class="annottext">BinHandle
</span><a href="#local-6989586621680835212"><span class="hs-identifier hs-var">bh</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Avail.html#Avail"><span class="hs-identifier hs-type">Avail</span></a></span><span> </span><span id="local-6989586621680835211"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680835211"><span class="hs-identifier hs-var">aa</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-271"></span><span>            </span><span class="annot"><span class="annottext">BinHandle -&gt; Word8 -&gt; IO ()
</span><a href="GHC.Utils.Binary.html#putByte"><span class="hs-identifier hs-var">putByte</span></a></span><span> </span><span class="annot"><span class="annottext">BinHandle
</span><a href="#local-6989586621680835212"><span class="hs-identifier hs-var">bh</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">0</span></span><span>
</span><span id="line-272"></span><span>            </span><span class="annot"><span class="annottext">BinHandle -&gt; Name -&gt; IO ()
forall a. Binary a =&gt; BinHandle -&gt; a -&gt; IO ()
</span><a href="GHC.Utils.Binary.html#put_"><span class="hs-identifier hs-var">put_</span></a></span><span> </span><span class="annot"><span class="annottext">BinHandle
</span><a href="#local-6989586621680835212"><span class="hs-identifier hs-var">bh</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680835211"><span class="hs-identifier hs-var">aa</span></a></span><span>
</span><span id="line-273"></span><span>    </span><span class="annot"><a href="GHC.Utils.Binary.html#put_"><span class="hs-identifier hs-var">put_</span></a></span><span> </span><span id="local-6989586621680835209"><span class="annot"><span class="annottext">BinHandle
</span><a href="#local-6989586621680835209"><span class="hs-identifier hs-var">bh</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Avail.html#AvailTC"><span class="hs-identifier hs-type">AvailTC</span></a></span><span> </span><span id="local-6989586621680835208"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680835208"><span class="hs-identifier hs-var">ab</span></a></span></span><span> </span><span id="local-6989586621680835207"><span class="annot"><span class="annottext">[Name]
</span><a href="#local-6989586621680835207"><span class="hs-identifier hs-var">ac</span></a></span></span><span> </span><span id="local-6989586621680835206"><span class="annot"><span class="annottext">[FieldLabel]
</span><a href="#local-6989586621680835206"><span class="hs-identifier hs-var">ad</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-274"></span><span>            </span><span class="annot"><span class="annottext">BinHandle -&gt; Word8 -&gt; IO ()
</span><a href="GHC.Utils.Binary.html#putByte"><span class="hs-identifier hs-var">putByte</span></a></span><span> </span><span class="annot"><span class="annottext">BinHandle
</span><a href="#local-6989586621680835209"><span class="hs-identifier hs-var">bh</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">1</span></span><span>
</span><span id="line-275"></span><span>            </span><span class="annot"><span class="annottext">BinHandle -&gt; Name -&gt; IO ()
forall a. Binary a =&gt; BinHandle -&gt; a -&gt; IO ()
</span><a href="GHC.Utils.Binary.html#put_"><span class="hs-identifier hs-var">put_</span></a></span><span> </span><span class="annot"><span class="annottext">BinHandle
</span><a href="#local-6989586621680835209"><span class="hs-identifier hs-var">bh</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680835208"><span class="hs-identifier hs-var">ab</span></a></span><span>
</span><span id="line-276"></span><span>            </span><span class="annot"><span class="annottext">BinHandle -&gt; [Name] -&gt; IO ()
forall a. Binary a =&gt; BinHandle -&gt; a -&gt; IO ()
</span><a href="GHC.Utils.Binary.html#put_"><span class="hs-identifier hs-var">put_</span></a></span><span> </span><span class="annot"><span class="annottext">BinHandle
</span><a href="#local-6989586621680835209"><span class="hs-identifier hs-var">bh</span></a></span><span> </span><span class="annot"><span class="annottext">[Name]
</span><a href="#local-6989586621680835207"><span class="hs-identifier hs-var">ac</span></a></span><span>
</span><span id="line-277"></span><span>            </span><span class="annot"><span class="annottext">BinHandle -&gt; [FieldLabel] -&gt; IO ()
forall a. Binary a =&gt; BinHandle -&gt; a -&gt; IO ()
</span><a href="GHC.Utils.Binary.html#put_"><span class="hs-identifier hs-var">put_</span></a></span><span> </span><span class="annot"><span class="annottext">BinHandle
</span><a href="#local-6989586621680835209"><span class="hs-identifier hs-var">bh</span></a></span><span> </span><span class="annot"><span class="annottext">[FieldLabel]
</span><a href="#local-6989586621680835206"><span class="hs-identifier hs-var">ad</span></a></span><span>
</span><span id="line-278"></span><span>    </span><span id="local-6989586621680835190"><span class="annot"><span class="annottext">get :: BinHandle -&gt; IO AvailInfo
</span><a href="GHC.Utils.Binary.html#get"><span class="hs-identifier hs-var hs-var hs-var hs-var">get</span></a></span></span><span> </span><span id="local-6989586621680835188"><span class="annot"><span class="annottext">BinHandle
</span><a href="#local-6989586621680835188"><span class="hs-identifier hs-var">bh</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-279"></span><span>            </span><span id="local-6989586621680835187"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621680835187"><span class="hs-identifier hs-var">h</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">BinHandle -&gt; IO Word8
</span><a href="GHC.Utils.Binary.html#getByte"><span class="hs-identifier hs-var">getByte</span></a></span><span> </span><span class="annot"><span class="annottext">BinHandle
</span><a href="#local-6989586621680835188"><span class="hs-identifier hs-var">bh</span></a></span><span>
</span><span id="line-280"></span><span>            </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621680835187"><span class="hs-identifier hs-var">h</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-281"></span><span>              </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">0</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span> </span><span id="local-6989586621680835185"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680835185"><span class="hs-identifier hs-var">aa</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">BinHandle -&gt; IO Name
forall a. Binary a =&gt; BinHandle -&gt; IO a
</span><a href="GHC.Utils.Binary.html#get"><span class="hs-identifier hs-var">get</span></a></span><span> </span><span class="annot"><span class="annottext">BinHandle
</span><a href="#local-6989586621680835188"><span class="hs-identifier hs-var">bh</span></a></span><span>
</span><span id="line-282"></span><span>                      </span><span class="annot"><span class="annottext">AvailInfo -&gt; IO AvailInfo
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Name -&gt; AvailInfo
</span><a href="GHC.Types.Avail.html#Avail"><span class="hs-identifier hs-var">Avail</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680835185"><span class="hs-identifier hs-var">aa</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-283"></span><span>              </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span> </span><span id="local-6989586621680835184"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680835184"><span class="hs-identifier hs-var">ab</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">BinHandle -&gt; IO Name
forall a. Binary a =&gt; BinHandle -&gt; IO a
</span><a href="GHC.Utils.Binary.html#get"><span class="hs-identifier hs-var">get</span></a></span><span> </span><span class="annot"><span class="annottext">BinHandle
</span><a href="#local-6989586621680835188"><span class="hs-identifier hs-var">bh</span></a></span><span>
</span><span id="line-284"></span><span>                      </span><span id="local-6989586621680835183"><span class="annot"><span class="annottext">[Name]
</span><a href="#local-6989586621680835183"><span class="hs-identifier hs-var">ac</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">BinHandle -&gt; IO [Name]
forall a. Binary a =&gt; BinHandle -&gt; IO a
</span><a href="GHC.Utils.Binary.html#get"><span class="hs-identifier hs-var">get</span></a></span><span> </span><span class="annot"><span class="annottext">BinHandle
</span><a href="#local-6989586621680835188"><span class="hs-identifier hs-var">bh</span></a></span><span>
</span><span id="line-285"></span><span>                      </span><span id="local-6989586621680835182"><span class="annot"><span class="annottext">[FieldLabel]
</span><a href="#local-6989586621680835182"><span class="hs-identifier hs-var">ad</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">BinHandle -&gt; IO [FieldLabel]
forall a. Binary a =&gt; BinHandle -&gt; IO a
</span><a href="GHC.Utils.Binary.html#get"><span class="hs-identifier hs-var">get</span></a></span><span> </span><span class="annot"><span class="annottext">BinHandle
</span><a href="#local-6989586621680835188"><span class="hs-identifier hs-var">bh</span></a></span><span>
</span><span id="line-286"></span><span>                      </span><span class="annot"><span class="annottext">AvailInfo -&gt; IO AvailInfo
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Name -&gt; [Name] -&gt; [FieldLabel] -&gt; AvailInfo
</span><a href="GHC.Types.Avail.html#AvailTC"><span class="hs-identifier hs-var">AvailTC</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680835184"><span class="hs-identifier hs-var">ab</span></a></span><span> </span><span class="annot"><span class="annottext">[Name]
</span><a href="#local-6989586621680835183"><span class="hs-identifier hs-var">ac</span></a></span><span> </span><span class="annot"><span class="annottext">[FieldLabel]
</span><a href="#local-6989586621680835182"><span class="hs-identifier hs-var">ad</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-287"></span></pre></body></html>